Skip to content

Commit

Permalink
check defined(__SANITIZE_ADDRESS__) to allow using ASAN with GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
HParker committed Oct 22, 2024
1 parent a83c91d commit c407fdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/sanitizers.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#endif

#ifdef HAVE_SANITIZER_ASAN_INTERFACE_H
# if __has_feature(address_sanitizer)
# if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
# define RUBY_ASAN_ENABLED
# include <sanitizer/asan_interface.h>
# endif
Expand Down
2 changes: 1 addition & 1 deletion vm_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ typedef struct rb_vm_struct {
#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE)) /* 64 KB or 128 KB */
#endif

#if __has_feature(memory_sanitizer) || __has_feature(address_sanitizer)
#if __has_feature(memory_sanitizer) || __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
/* It seems sanitizers consume A LOT of machine stacks */
#undef RUBY_VM_THREAD_MACHINE_STACK_SIZE
#define RUBY_VM_THREAD_MACHINE_STACK_SIZE (1024 * 1024 * sizeof(VALUE))
Expand Down

0 comments on commit c407fdd

Please sign in to comment.