Skip to content

Commit 951e57d

Browse files
committed
Try asan
1 parent 5e5f2a6 commit 951e57d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/rbs_extension/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,10 @@ void Init_rbs_extension(void) {
466466
#ifdef HAVE_RB_EXT_RACTOR_SAFE
467467
rb_ext_ractor_safe(true);
468468
#endif
469+
// ASAN test: intentional heap buffer overflow to verify ASAN is working
470+
volatile char *test_ptr = malloc(10);
471+
test_ptr[10] = 'A'; // Out of bounds write - this will be caught by ASAN
472+
469473
rbs__init_constants();
470474
rbs__init_location();
471475
rbs__init_parser();

0 commit comments

Comments
 (0)