From 328ece846310e9c9ffbe3ae1b8f2678b1bcbd353 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 23 Oct 2022 15:16:51 +0200 Subject: [PATCH] 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. --- coregrind/m_debuginfo/readelf.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c index 6cf08f666..56e7d4b6f 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 -- 2.11.4.GIT