]> git.ipfire.org Git - thirdparty/gcc.git/commit
sanitizer: Cherry-pick realpath fix
authorJakub Jelinek <jakub@redhat.com>
Wed, 11 Aug 2021 08:23:34 +0000 (10:23 +0200)
committerJakub Jelinek <jakub@redhat.com>
Thu, 12 Aug 2021 20:55:01 +0000 (22:55 +0200)
commit13e44296ea7bd58f2ebae818ca9b929c4677e035
tree03689a180e63a51d14483a34e955540704de9b46
parentdd345961831980e3103411d61bba249efa2ee720
sanitizer: Cherry-pick realpath fix

tsan in some cases starts ignoring interceptors and only calls the
intercepted functions.  But for realpath the behavior for NULL second argument
was only handled in the interceptor and intercepted function was the one
found by dlsym which is often one that doesn't handle NULL as second argument.

Fixed by using dlvsym with "GLIBC_2.3" if possible for intercepted function
and don't emulate behavior in the wrapper.

2021-08-11  Jakub Jelinek  <jakub@redhat.com>

* sanitizer_common/sanitizer_common_interceptors.inc: Cherry-pick
llvm-project revision faef0d042f523357fe5590e7cb6a8391cf0351a8.

(cherry picked from commit 0e6017f5b4f13906dd2c09b25403ffa94a80181f)
libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc