Skip to content

Commit 8358807

Browse files
committed
ci: Enhance sanitizer's config
1 parent 1d828c0 commit 8358807

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

circle.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ commands:
233233
working_directory: ~/build
234234
command: |
235235
set +e
236-
export ASAN_OPTIONS=detect_invalid_pointer_pairs=1 # TODO: value 2 causes failures in standard library.
236+
# TODO: Value 2 causes failures in standard library, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97415.
237+
export ASAN_OPTIONS=detect_invalid_pointer_pairs=1
237238
expected=" PASSED <<parameters.expected_passed>>, FAILED <<parameters.expected_failed>>, SKIPPED <<parameters.expected_skipped>>."
238239
result=$(bin/fizzy-spectests <<#parameters.skip_validation>>--skip-validation<</parameters.skip_validation>> json | tail -1)
239240
echo $result
@@ -371,16 +372,14 @@ jobs:
371372
sanitizers-clang:
372373
executor: linux-clang-latest
373374
environment:
374-
# TODO: Enable detect_stack_use_after_return=1 when https://bugs.llvm.org/show_bug.cgi?id=47626 is fixed.
375-
ASAN_OPTIONS: detect_invalid_pointer_pairs=2
375+
ASAN_OPTIONS: detect_stack_use_after_return=1:check_initialization_order=1
376376
UBSAN_OPTIONS: halt_on_error=1
377377
steps:
378378
- install_testfloat
379379
- checkout
380380
- build:
381381
build_type: RelWithDebInfo
382-
# TODO: pointer-compare produces failure in std::string operator+.
383-
cmake_options: -DENABLE_ASSERTIONS=ON -DSANITIZE=address,pointer-subtract,undefined,nullability,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation
382+
cmake_options: -DENABLE_ASSERTIONS=ON -DSANITIZE=address,undefined,nullability,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation
384383
- test
385384
- benchmark:
386385
min_time: "0.01"
@@ -389,8 +388,8 @@ jobs:
389388
sanitizers-gcc:
390389
executor: linux-gcc-latest
391390
environment:
392-
# TODO: Enable detect_stack_use_after_return=1 when https://bugs.llvm.org/show_bug.cgi?id=47626 is fixed.
393-
ASAN_OPTIONS: detect_invalid_pointer_pairs=2
391+
# TODO: Enable detect_stack_use_after_return=1 when https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97414 is fixed.
392+
ASAN_OPTIONS: detect_invalid_pointer_pairs=2:check_initialization_order=1
394393
UBSAN_OPTIONS: halt_on_error=1
395394
steps:
396395
- checkout
@@ -409,15 +408,13 @@ jobs:
409408
sanitizers-macos:
410409
executor: macos
411410
environment:
412-
# TODO: Enable detect_stack_use_after_return=1 when https://bugs.llvm.org/show_bug.cgi?id=47626 is fixed.
413-
ASAN_OPTIONS: detect_invalid_pointer_pairs=2
411+
ASAN_OPTIONS: detect_stack_use_after_return=1:check_initialization_order=1
414412
UBSAN_OPTIONS: halt_on_error=1
415413
steps:
416414
- install_macos_deps
417415
- checkout
418416
- build:
419417
build_type: RelWithDebInfo
420-
# TODO: Enable pointer-compare and pointer-subtract only for libfizzy.
421418
cmake_options: -DENABLE_ASSERTIONS=ON -DSANITIZE=address,undefined,nullability,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation
422419
- test
423420
- benchmark:
@@ -481,8 +478,7 @@ jobs:
481478
fuzzing:
482479
executor: linux-clang-latest
483480
environment:
484-
# TODO: Enable detect_stack_use_after_return=1 when https://bugs.llvm.org/show_bug.cgi?id=47626 is fixed.
485-
ASAN_OPTIONS: detect_invalid_pointer_pairs=2
481+
ASAN_OPTIONS: detect_stack_use_after_return=1:check_initialization_order=1
486482
UBSAN_OPTIONS: halt_on_error=1
487483
steps:
488484
- checkout
@@ -595,10 +591,10 @@ jobs:
595591
rustup toolchain install nightly-x86_64-unknown-linux-gnu
596592
- run:
597593
name: Build (debug mode)
598-
command: RUSTFLAGS="-Z sanitizer=address" ASAN_OPTIONS=detect_leaks=1 cargo +nightly build --target x86_64-unknown-linux-gnu
594+
command: RUSTFLAGS="-Z sanitizer=address" cargo +nightly build --target x86_64-unknown-linux-gnu
599595
- run:
600596
name: Test (debug mode)
601-
command: RUSTFLAGS="-Z sanitizer=address -C opt-level=0" ASAN_OPTIONS=detect_leaks=1 cargo +nightly test --target x86_64-unknown-linux-gnu
597+
command: RUSTFLAGS="-Z sanitizer=address -C opt-level=0" cargo +nightly test --target x86_64-unknown-linux-gnu
602598

603599
workflows:
604600
version: 2

0 commit comments

Comments
 (0)