@@ -14374,8 +14374,14 @@ AT_KEYWORDS([runmisc CALL bounds exceptions])
1437414374
1437514375# note: this check is likely unportable and therefore will likely be adjusted/skipped,
1437614376# mainly because the memory layout of consecutive variables is not guaranteed;
14377- # it is expected to raise a crash if C bound checking is enabled
14378- AT_SKIP_IF([test $($COBC --info | $GREP -c sanitize) != 0])
14377+ # it is expected to raise a crash if C bound checking is enabled,
14378+ # not forwarding signals for critical errors like segmentation faults to user-defined
14379+ # signal handler - we can at least portably skip some.
14380+ AT_DATA([ubsan.supp], [
14381+ null:*
14382+ ])
14383+
14384+ # AT_SKIP_IF([test $($COBC --info | $GREP -c sanitize) != 0])
1437914385
1438014386AT_DATA([caller.cob], [
1438114387 IDENTIFICATION DIVISION.
@@ -14448,22 +14454,26 @@ AT_DATA([callee.cob], [
1444814454
1444914455AT_CHECK([$COMPILE -fno-ec=program-arg-mismatch -fmemory-check=pointer caller.cob], [0], [], [])
1445014456AT_CHECK([$COMPILE_MODULE -fno-ec=program-arg-mismatch callee.cob], [0], [], [])
14451- AT_CHECK([$COBCRUN_DIRECT ./caller], [1], [],
14457+ AT_CHECK([ASAN_OPTIONS=handle_segv=0 UBSAN_OPTIONS="suppressions=ubsan.supp:halt_on_error=0" \
14458+ COBCRUN_DIRECT ./caller], [1], [],
1445214459[libcob: caller.cob:30: error: memory violation detected after CALL
1445314460])
1445414461
1445514462AT_CHECK([$COMPILE -fno-ec=program-arg-mismatch -fmemory-check=using caller.cob], [0], [], [])
14456- AT_CHECK([$COBCRUN_DIRECT ./caller], [1], [],
14463+ AT_CHECK([ASAN_OPTIONS=handle_segv=0 UBSAN_OPTIONS="suppressions=ubsan.supp:halt_on_error=0" \
14464+ COBCRUN_DIRECT ./caller], [1], [],
1445714465[libcob: caller.cob:30: error: memory violation detected for 'var' after CALL
1445814466])
1445914467
1446014468AT_CHECK([$COMPILE -fno-ec=program-arg-mismatch -fmemory-check caller.cob], [0], [], [])
14461- AT_CHECK([$COBCRUN_DIRECT ./caller], [1], [],
14469+ AT_CHECK([ASAN_OPTIONS=handle_segv=0 UBSAN_OPTIONS="suppressions=ubsan.supp:halt_on_error=0" \
14470+ COBCRUN_DIRECT ./caller], [1], [],
1446214471[libcob: caller.cob:30: error: memory violation detected for 'var' after CALL
1446314472])
1446414473
1446514474AT_CHECK([$COMPILE -fno-ec=program-arg-mismatch -fmemory-check=all caller.cob], [0], [], [])
14466- AT_CHECK([$COBCRUN_DIRECT ./caller], [1], [],
14475+ AT_CHECK([ASAN_OPTIONS=handle_segv=0 UBSAN_OPTIONS="suppressions=ubsan.supp:halt_on_error=0" \
14476+ COBCRUN_DIRECT ./caller], [1], [],
1446714477[libcob: caller.cob:30: error: memory violation detected for 'var' after CALL
1446814478])
1446914479
@@ -15830,9 +15840,8 @@ main (int argc, char **argv)
1583015840AT_CHECK([$COMPILE caller.c], [0], [], [])
1583115841AT_CHECK([$COMPILE_MODULE callee.cob -fno-ec=all], [0], [], [])
1583215842
15833- # In some environments (e.g. MSVC), Windows does not forward signals for
15834- # critical errors like segmentation faults to user-defined signal handler
15835- # when the target program/library is compiled under the debug target, which
15843+ # In some environments (especially with sanitizers enabled), the system does not forward signals
15844+ # for critical errors like segmentation faults to user-defined signal handler, which
1583615845# breaks COB_SIGNAL_REGIME tests.
1583715846# Sanitizers may get in the way as well - we can at least portably
1583815847# skip some
0 commit comments