]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix DRD and Helgrind on Solaris.
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 23 Oct 2022 13:16:51 +0000 (15:16 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 23 Oct 2022 13:29:40 +0000 (15:29 +0200)
It seems as though Solaris RW sections can also have the
execute flag set. Checking for RW and !X was causing the
debuginfo reading to fail. That meant that the helgrind and
drd preload shared libraries weren't processed, and also
the rtld bind function pointers not setup. Without the rtld bind
function an assert fires and Helgrind and DRD abort.

coregrind/m_debuginfo/readelf.c

index 6cf08f666f02f4de64642d0a6383bc0ee1fb5df6..56e7d4b6f08f539f740eafd8848cf6c423e86ed8 100644 (file)
@@ -3682,6 +3682,11 @@ Bool ML_(check_elf_and_get_rw_loads) ( Int fd, const HChar* filename, Int * rw_l
 #else
    flag_x = 0;
 #endif
+
+#if defined(VGO_solaris)
+   flag_x = 0;
+#endif
+
    vg_assert(ehdr_mioff == 0); // ensured by its initialisation
    ok = ML_(img_valid)(mimg, ehdr_mioff, sizeof(ehdr_m));
    vg_assert(ok); // ML_(is_elf_object_file) should ensure this