From: Paul Floyd Date: Sun, 23 Oct 2022 13:16:51 +0000 (+0200) Subject: Fix DRD and Helgrind on Solaris. X-Git-Tag: VALGRIND_3_20_0~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=328ece846310e9c9ffbe3ae1b8f2678b1bcbd353;p=thirdparty%2Fvalgrind.git Fix DRD and Helgrind on Solaris. 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. --- diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c index 6cf08f666f..56e7d4b6f0 100644 --- a/coregrind/m_debuginfo/readelf.c +++ b/coregrind/m_debuginfo/readelf.c @@ -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