Symbol tls_get_addr_internal is a GLIBC_PRIVATE private symbol on s390{,x}, the glibc folks aren't very happy about asan using it.
Additionally, only recent glibc versions have it, older versions just have tls_get_offset and nothing else.
The patch doesn't drop the tls_get_addr_internal interception altogether, but changes it so that it calls real tls_get_offset function instead (and much more importantly,
that tls_get_offset interception calls the real tls_get_offset function).
This way it should work also on glibc 2.18 and earlier. See http://gcc.gnu.org/PR79341 for further details.
Details
Diff Detail
Event Timeline
LGTM
This seems to be a S390-only change, right?
Is there anyone else who can review S390 code?
(I don't even pretend to understand what's going on here)
LGTM-ing anyway.
(BTW, please upload patches with full context next time)
Yes.
Is there anyone else who can review S390 code?
Maybe the IBM s390 GCC maintainers (I'll cross-link this page to the GCC PR).
(I don't even pretend to understand what's going on here)
LGTM-ing anyway.
lib/sanitizer_common/sanitizer_common_interceptors.inc | ||
---|---|---|
4668 | Should be OK to just br %r3 here and skip the load instructions above. Otherwise LGTM. |
LGTM with a nit.
lib/sanitizer_common/sanitizer_common_interceptors.inc | ||
---|---|---|
4631 | Nit: the symbol is now hidden. |
Shall I upload a new patch with that? What is the process now, can somebody check it in for me?
check-asan does not pass with this change due to lint"
/tmp/check_lint.XhMkOExnXU/tmp.TSPGZQsNod.sanitizer_common_interceptors.inc.cc:4611: Extra space before ( in function call [whitespace/parens] [4]
/tmp/check_lint.XhMkOExnXU/tmp.TSPGZQsNod.sanitizer_common_interceptors.inc.cc:4611: All parameters should be named in a function [readability/function] [3]
/tmp/check_lint.XhMkOExnXU/tmp.TSPGZQsNod.sanitizer_common_interceptors.inc.cc:4614: Extra space before ( in function call [whitespace/parens] [4]
/tmp/check_lint.XhMkOExnXU/tmp.TSPGZQsNod.sanitizer_common_interceptors.inc.cc:4615: Extra space before ( in function call [whitespace/parens] [4]
I can fix that of course, but I also want to ask one more thing: is this change testable?
Does it deserve an extra test, or the existing tests cover it?
Are there buildbots running these tests?
Changed.
I can fix that of course, but I also want to ask one more thing: is this change testable?
Does it deserve an extra test, or the existing tests cover it?
Many existing tests cover it already (added a Report in there and it got printed many times during testing). So if the above would not work properly, you'd notice immediately.
If you want to see crashes without the patch, you'd need to have glibc 2.18 or older (one that doesn't provide __tls_get_offset_internal@@GLIBC_PRIVATE symbol).
Are there buildbots running these tests?
Yes.
Nit: the symbol is now hidden.