Skip to content

Commit 3c91a1e

Browse files
committed
Fix ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS for MSAN
There's no case for when RUBY_MSAN_ENABLED, so the macro ends up doing nothing when it should instead have __attribute__((__no_sanitize__("memory"))).
1 parent 5898abd commit 3c91a1e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/sanitizers.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
#elif defined(RUBY_ASAN_ENABLED)
4040
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
4141
__attribute__((__no_sanitize__("address"), __noinline__)) x
42+
#elif defined(RUBY_MSAN_ENABLED)
43+
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
44+
__attribute__((__no_sanitize__("memory"), __noinline__)) x
4245
#elif defined(NO_SANITIZE_ADDRESS)
4346
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
4447
NO_SANITIZE_ADDRESS(NOINLINE(x))

0 commit comments

Comments
 (0)