|
From: Paul F. <pa...@so...> - 2022-10-23 13:29:57
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=328ece846310e9c9ffbe3ae1b8f2678b1bcbd353 commit 328ece846310e9c9ffbe3ae1b8f2678b1bcbd353 Author: Paul Floyd <pj...@wa...> Date: Sun Oct 23 15:16:51 2022 +0200 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: --- 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 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 |