SUMMARY With commit 7844752299b5472b21fc4df765d4cffdf92c6c3d (Bug 452802 Handle lld 9+ split RW PT_LOAD segments correctly), the newly added ``` + + if (inrw2) { + inrw = inrw2; + } else { + inrw = inrw1; + } ``` block was incorrectly placed right bellow the `#if defined(SOLARIS_PT_SUNDWTRACE_THRP)` section, which very much changed the code as the `SOLARIS_PT_SUNDWTRACE_THRP` section ends with opened `else` intended for `if (inrw && !di->data_present) {` below. Moving the section above the ifdef block fixes the issue (path attached). OBSERVED RESULT Many elf related tests fail. EXPECTED RESULT They should pass. SOFTWARE/OS VERSIONS Oracle Solaris 11.4.66 (where SOLARIS_PT_SUNDWTRACE_THRP is defined) ADDITIONAL INFORMATION https://sourceware.org/git/?p=valgrind.git;a=commit;h=7844752299b5472b21fc4df765d4cffdf92c6c3d https://sourceware.org/git/?p=valgrind.git;a=blobdiff;f=coregrind/m_debuginfo/readelf.c;h=b4edb4fe854237f053ae6946dd27a4304a2efc96;hp=ea9c80415b83734f04ed498d5661a0280cd03854;hb=7844752299b5472b21fc4df765d4cffdf92c6c3d;hpb=67b8fef50bfaed0ce5a1d8130836bcef0eafcd4b
Created attachment 163015 [details] patch
Which version of Solaris is this? Have you tried with git head?
Ah yes, Solaris 11.4 Cool, I see that this comes from https://github.com/oracle/solaris-userland/blob/master/components/valgrind/patches/06-dtrace-fix.patch It's been on my todo list for a long long time to get in touch with you to merge these things.
I didn't try the current git head, but nothing changed in the affected code since 3.21.0. (In reply to Paul Floyd from comment #3) > Cool, I see that this comes from > https://github.com/oracle/solaris-userland/blob/master/components/valgrind/ > patches/06-dtrace-fix.patch > > It's been on my todo list for a long long time to get in touch with you to > merge these things. Oh yes. This one is pretty recent, but there are other older patches that I have yet to send your way. I will dust them off and do so.
commit 242d8881e10328ff98c37ceb7fd31955a29cad82 Author: Paul Floyd <pjfloyd@wanadoo.fr> Date: Fri Nov 10 17:56:52 2023 +0100 Bug 476787 - Build of Valgrind 3.21.0 fails when SOLARIS_PT_SUNDWTRACE_THRP is defined Patch provided by Jakub Kulik kulikjak@gmail.com