Skip to content

Commit bc89cde

Browse files
committed
py/gc: Only use no_sanitize_address attribute for GCC 4.8 and above.
It's not supported on older GCC versions. Signed-off-by: Damien George <[email protected]>
1 parent eb7ae53 commit bc89cde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ void gc_collect_start(void) {
345345
// Address sanitizer needs to know that the access to ptrs[i] must always be
346346
// considered OK, even if it's a load from an address that would normally be
347347
// prohibited (due to being undefined, in a red zone, etc).
348-
#ifdef __GNUC__
348+
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
349349
__attribute__((no_sanitize_address))
350350
#endif
351351
static void *gc_get_ptr(void **ptrs, int i) {

0 commit comments

Comments
 (0)