diff options
| author | Nikita Popov <npopov@redhat.com> | 2024-07-30 09:25:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-30 09:25:03 +0200 |
| commit | 155b7a12820ec45095988b6aa6e057afaf2bc892 (patch) | |
| tree | 71b8308f10ec30bbccd667ab4ab54ce90264f84c /lldb/source/Plugins/ScriptInterpreter/Python | |
| parent | 2b23e6c8d6a28ce1c134d1b6b322e35eec9d98e4 (diff) | |
| download | llvm-155b7a12820ec45095988b6aa6e057afaf2bc892.zip llvm-155b7a12820ec45095988b6aa6e057afaf2bc892.tar.gz llvm-155b7a12820ec45095988b6aa6e057afaf2bc892.tar.bz2 | |
[Sanitizers] Avoid overload ambiguity for interceptors (#100986)
Since glibc 2.40 some functions like openat make use of overloads when
built with `-D_FORTIFY_SOURCE=2`, see:
https://github.com/bminor/glibc/blob/master/io/bits/fcntl2.h
This means that doing something like `(uintptr_t) openat` or `(void *)
openat` is now ambiguous, breaking the compiler-rt build on new glibc
versions.
Fix this by explicitly casting the symbol to the expected function type
before casting it to an intptr. The expected type is obtained as
`decltype(REAL(func))` so we don't have to repeat the signature from
INTERCEPTOR in the INTERCEPT_FUNTION macro.
Fixes https://github.com/llvm/llvm-project/issues/100754.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
0 files changed, 0 insertions, 0 deletions
