This is an archive of the discontinued LLVM Phabricator instance.

sanitizer_common: Try looking up symbols with RTLD_DEFAULT if RTLD_NEXT does not work.
ClosedPublic

Authored by pcc on Nov 7 2017, 6:50 PM.

Details

Summary

If the lookup using RTLD_NEXT failed, the sanitizer runtime library
is later in the library search order than the DSO that we are trying
to intercept, which means that we cannot intercept this function. We
still want the address of the real definition, though, so look it up
using RTLD_DEFAULT.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc created this revision.Nov 7 2017, 6:50 PM
pcc added a comment.Nov 7 2017, 6:51 PM

I cannot run the test on Android myself, so it may require adjustment.

pcc updated this revision to Diff 122179.Nov 8 2017, 4:30 PM
  • Fix test case
eugenis accepted this revision.Nov 10 2017, 1:13 PM
This revision is now accepted and ready to land.Nov 10 2017, 1:13 PM
This revision was automatically updated to reflect the committed changes.