Bug 1449604
Summary: | CC 6.3 libasan.so intercepts dlopen but does not taken the search path from the original module into account | ||
---|---|---|---|
Product: | Red Hat Developer Toolset | Reporter: | Piyush Bhoot <pbhoot> |
Component: | gcc | Assignee: | Marek Polacek <mpolacek> |
Status: | CLOSED UPSTREAM | QA Contact: | Martin Cermak <mcermak> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | DTS 6.0 RHEL 7 | CC: | codonell, fweimer, jakub, kanderso, law, mcermak, mnewsome |
Target Milestone: | alpha | ||
Target Release: | 6.1 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-06-24 15:09:23 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Piyush Bhoot
2017-05-10 10:58:50 UTC
I think the libasan dlopen interceptor could be turned into a tail call, which would address the issue. #define COMMON_INTERCEPTOR_ON_DLOPEN(filename, flag) \ if (flags()->strict_init_order) { \ StopInitOrderChecking(); \ } The above probably could just as well happen before the dlopen call. (In reply to Florian Weimer from comment #4) > I think the libasan dlopen interceptor could be turned into a tail call, > which would address the issue. > > #define COMMON_INTERCEPTOR_ON_DLOPEN(filename, flag) > \ > if (flags()->strict_init_order) { > \ > StopInitOrderChecking(); > \ > } > > The above probably could just as well happen before the dlopen call. I don't see how. The interceptor does some work before the dlopen call and other work after it: INTERCEPTOR(void*, dlopen, const char *filename, int flag) { void *ctx; COMMON_INTERCEPTOR_ENTER_NOIGNORE(ctx, dlopen, filename, flag); if (filename) COMMON_INTERCEPTOR_READ_STRING(ctx, filename, 0); COMMON_INTERCEPTOR_ON_DLOPEN(filename, flag); void *res = REAL(dlopen)(filename, flag); Symbolizer::GetOrInit()->InvalidateModuleList(); COMMON_INTERCEPTOR_LIBRARY_LOADED(filename, res); return res; } |