Bug 355454 - do not intercept malloc related symbols from the runtime linker
Summary: do not intercept malloc related symbols from the runtime linker
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR major
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-16 20:29 UTC by Ivo Raisr
Modified: 2015-11-18 20:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch for the Solaris runtime linker (1.34 KB, patch)
2015-11-16 20:32 UTC, Ivo Raisr
Details
proposed patch for all platforms (6.10 KB, patch)
2015-11-18 05:18 UTC, Ivo Raisr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivo Raisr 2015-11-16 20:29:33 UTC
After bugfix BZ#355188 [1], also malloc related global symbols in the Solaris runtime linker are intercepted. This completely breaks memcheck on Solaris because ld.so.1 contains public functions malloc/calloc/free/... with different semantics than from the standard libc & friends.

After discussion with Mark W., he suggested that excluding the runtime linker from interception malloc related symbols is desirable:
... That seems a reasonable thing to do in general, the dynamic linker
is special and we probably never want to match generic global symbols in
it, so maybe do it for any ld.so.



[1] https://bugs.kde.org/show_bug.cgi?id=355188
Comment 1 Ivo Raisr 2015-11-16 20:32:09 UTC
Created attachment 95542 [details]
patch for the Solaris runtime linker
Comment 2 Ivo Raisr 2015-11-18 05:18:19 UTC
Created attachment 95581 [details]
proposed patch for all platforms

Improved patch.
Documentation and comments improved.
Existing functionality refactored and targets all platforms.
Comment 3 Ivo Raisr 2015-11-18 20:39:14 UTC
Commited as SVN r15728.