mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-133157: remove usage of _Py_NO_SANITIZE_UNDEFINED
in pyexpat
(#135346)
This was the last usage, so the macro is removed as well. Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
parent
23caccf74c
commit
845263adc6
4 changed files with 96 additions and 29 deletions
|
@ -667,25 +667,6 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
|
||||
// _Py_NO_SANITIZE_UNDEFINED(): Disable Undefined Behavior sanitizer (UBsan)
|
||||
// on a function.
|
||||
//
|
||||
// Clang and GCC 9.0+ use __attribute__((no_sanitize("undefined"))).
|
||||
// GCC 4.9+ uses __attribute__((no_sanitize_undefined)).
|
||||
#if defined(__has_feature)
|
||||
# if __has_feature(undefined_behavior_sanitizer)
|
||||
# define _Py_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined")))
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(_Py_NO_SANITIZE_UNDEFINED) && defined(__GNUC__) \
|
||||
&& ((__GNUC__ >= 5) || (__GNUC__ == 4) && (__GNUC_MINOR__ >= 9))
|
||||
# define _Py_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize_undefined))
|
||||
#endif
|
||||
#ifndef _Py_NO_SANITIZE_UNDEFINED
|
||||
# define _Py_NO_SANITIZE_UNDEFINED
|
||||
#endif
|
||||
|
||||
|
||||
// _Py_NONSTRING: The nonstring variable attribute specifies that an object or
|
||||
// member declaration with type array of char, signed char, or unsigned char,
|
||||
// or pointer to such a type is intended to store character arrays that do not
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue