Skip to content

Commit abbe6a6

Browse files
committed
ci: Extend ASan checks
1 parent 7e00fea commit abbe6a6

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

circle.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ commands:
118118
- ~/.hunter/_Base/Cache
119119
- run:
120120
name: "Build <<parameters.configuration_name>> (<<parameters.build_type>>)"
121-
command: cmake --build ~/build --target <<parameters.target>> -- -j12
121+
command: cmake --build ~/build --target <<parameters.target>> -- -j6
122122

123123
test:
124124
description: "Test"
@@ -233,6 +233,7 @@ 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.
236237
expected=" PASSED <<parameters.expected_passed>>, FAILED <<parameters.expected_failed>>, SKIPPED <<parameters.expected_skipped>>."
237238
result=$(bin/fizzy-spectests <<#parameters.skip_validation>>--skip-validation<</parameters.skip_validation>> json | tail -1)
238239
echo $result
@@ -361,16 +362,19 @@ jobs:
361362
destination: coverage
362363
- upload_coverage_data
363364

364-
sanitizers:
365+
sanitizers-clang:
365366
executor: linux-clang-latest
366367
environment:
368+
# TODO: Enable detect_stack_use_after_return=1 when https://bugs.llvm.org/show_bug.cgi?id=47626 is fixed.
369+
ASAN_OPTIONS: detect_invalid_pointer_pairs=2
367370
UBSAN_OPTIONS: halt_on_error=1
368371
steps:
369372
- install_testfloat
370373
- checkout
371374
- build:
372375
build_type: RelWithDebInfo
373-
cmake_options: -DENABLE_ASSERTIONS=ON -DSANITIZE=address,undefined,nullability,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation
376+
# TODO: pointer-compare produces failure in std::string operator+.
377+
cmake_options: -DENABLE_ASSERTIONS=ON -DSANITIZE=address,pointer-subtract,undefined,nullability,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation
374378
- test
375379
- benchmark:
376380
min_time: "0.01"
@@ -379,13 +383,16 @@ jobs:
379383
sanitizers-macos:
380384
executor: macos
381385
environment:
386+
# TODO: Enable detect_stack_use_after_return=1 when https://bugs.llvm.org/show_bug.cgi?id=47626 is fixed.
387+
ASAN_OPTIONS: detect_invalid_pointer_pairs=2
382388
UBSAN_OPTIONS: halt_on_error=1
383389
steps:
384390
- install_macos_deps
385391
- checkout
386392
- build:
387393
build_type: RelWithDebInfo
388-
cmake_options: -DENABLE_ASSERTIONS=ON -DSANITIZE=address,undefined,nullability,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation
394+
# TODO: pointer-compare produces failure in std::string operator+.
395+
cmake_options: -DENABLE_ASSERTIONS=ON -DSANITIZE=address,pointer-subtract,undefined,nullability,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation
389396
- test
390397
- benchmark:
391398
min_time: "0.01"
@@ -448,6 +455,8 @@ jobs:
448455
fuzzing:
449456
executor: linux-clang-latest
450457
environment:
458+
# TODO: Enable detect_stack_use_after_return=1 when https://bugs.llvm.org/show_bug.cgi?id=47626 is fixed.
459+
ASAN_OPTIONS: detect_invalid_pointer_pairs=2
451460
UBSAN_OPTIONS: halt_on_error=1
452461
steps:
453462
- checkout
@@ -474,7 +483,7 @@ jobs:
474483
MAX_LEN=100
475484
476485
# Invisible background jobs:
477-
bin/fizzy-fuzz-parser corpus-local -runs=$RUNS -max_len=$MAX_LEN -len_control=100000 -use_value_profile=1 -verbosity=0 -jobs=5 2>/dev/null &
486+
bin/fizzy-fuzz-parser corpus-local -runs=$RUNS -max_len=$MAX_LEN -len_control=100000 -use_value_profile=1 -verbosity=0 -jobs=4 2>/dev/null &
478487
479488
# Main job, to see logs:
480489
bin/fizzy-fuzz-parser corpus-local -runs=$RUNS -max_len=$MAX_LEN -len_control=100000 -use_value_profile=1 -print_final_stats=1
@@ -584,7 +593,7 @@ workflows:
584593
- sanitizers-macos
585594
- coverage-gcc
586595
- coverage-clang
587-
- sanitizers
596+
- sanitizers-clang
588597
- sanitizers-macos
589598
- fuzzing
590599
- spectest:

0 commit comments

Comments
 (0)