Skip to content

Commit 0e08fa6

Browse files
Skip JBMC symex-driven-lazy-loading pass under sanitizers
Under sanitizers, the JBMC regression suite takes over 6 hours because each test directory runs tests twice: once normally and once with --symex-driven-lazy-loading. Even the lazy-loading pass alone exceeds GitHub Actions' 6-hour timeout for the larger directories. Split into two jobs: - jbmc-regression: all directories, normal pass only (SKIP_SYMEX_DRIVEN_LAZY_LOADING=1) - jbmc-regression-symex-lazy-loading: lazy-loading pass for the smaller directories only (strings-smoke-tests, jbmc-generics, book-examples) to still exercise that code path under sanitizers. The large directories (jbmc, jbmc-strings) are skipped as they alone would exceed the 6-hour timeout. The JBMC regression Makefiles now support two variables: - SKIP_SYMEX_DRIVEN_LAZY_LOADING: skip the --symex-driven-lazy-loading pass - ONLY_SYMEX_DRIVEN_LAZY_LOADING: skip the normal pass (lazy loading only) When neither is set, behavior is unchanged (both passes run). Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
1 parent a921f4f commit 0e08fa6

6 files changed

Lines changed: 96 additions & 3 deletions

File tree

.github/workflows/clang-sanitizer.yaml

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
#
1414
# ├── cbmc-special-regression (paths-lifo, cprover-smt2)
1515
#
16-
# └── jbmc-regression (JBMC regression suite)
16+
# ├── jbmc-regression (JBMC, no lazy loading)
17+
#
18+
# └── jbmc-regression-symex-lazy-loading (subset)
1719
#
1820
# The build job compiles all binaries with sanitizer flags and uploads
1921
# them as a tarball artifact. The four test jobs download the artifact
@@ -237,6 +239,8 @@ jobs:
237239
make -C regression/cbmc test-cprover-smt2
238240
239241
# Run the JBMC regression test suite (all directories under jbmc/regression/).
242+
# The symex-driven-lazy-loading pass is skipped because it roughly doubles
243+
# the runtime, pushing the job past GitHub's 6-hour timeout under sanitizers.
240244
jbmc-regression:
241245
runs-on: ubuntu-24.04
242246
needs: build-asan
@@ -260,7 +264,48 @@ jobs:
260264
name: asan-build
261265
- name: Extract build artifacts
262266
run: tar xzf build-artifacts.tar.gz
263-
- name: Run JBMC regression tests
267+
- name: Run JBMC regression tests (without lazy loading)
264268
env:
265269
TESTPL_TIMEOUT: "1800"
266-
run: make -C jbmc/regression test-parallel JOBS=${{env.linux-vcpus}}
270+
run: make -C jbmc/regression test-parallel JOBS=${{env.linux-vcpus}} SKIP_SYMEX_DRIVEN_LAZY_LOADING=1
271+
272+
# Run the symex-driven-lazy-loading pass for a subset of JBMC directories.
273+
# The full lazy-loading pass exceeds GitHub's 6-hour timeout under
274+
# sanitizers, so we only run the smaller directories (jbmc-generics,
275+
# book-examples, strings-smoke-tests) to still exercise that code path.
276+
jbmc-regression-symex-lazy-loading:
277+
runs-on: ubuntu-24.04
278+
needs: build-asan
279+
timeout-minutes: 360
280+
env:
281+
ASAN_OPTIONS: "abort_on_error=1:fast_unwind_on_malloc=0:detect_odr_violation=0:detect_leaks=0"
282+
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
283+
steps:
284+
- uses: actions/checkout@v6
285+
with:
286+
submodules: recursive
287+
- name: Fetch dependencies
288+
env:
289+
DEBIAN_FRONTEND: noninteractive
290+
run: |
291+
sudo apt-get update
292+
sudo apt-get install --no-install-recommends -yq clang-19 clang++-19 gdb maven jq parallel flex bison
293+
- name: Download build artifacts
294+
uses: actions/download-artifact@v4
295+
with:
296+
name: asan-build
297+
- name: Extract build artifacts
298+
run: tar xzf build-artifacts.tar.gz
299+
- name: Run JBMC symex-driven-lazy-loading tests (subset)
300+
env:
301+
TESTPL_TIMEOUT: "1800"
302+
run: |
303+
cd jbmc/regression
304+
mvn --quiet clean package -T1C
305+
parallel \
306+
--halt soon,fail=1 \
307+
--tag --tagstring '{#}:' \
308+
--linebuffer \
309+
--jobs ${{env.linux-vcpus}} \
310+
make -C "{}" test ONLY_SYMEX_DRIVEN_LAZY_LOADING=1 \
311+
::: strings-smoke-tests jbmc-generics book-examples

jbmc/regression/book-examples/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,28 @@ default: tests.log
33
include ../../src/config.inc
44

55
test:
6+
ifndef ONLY_SYMEX_DRIVEN_LAZY_LOADING
67
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation"
8+
endif
9+
ifndef SKIP_SYMEX_DRIVEN_LAZY_LOADING
710
ifeq ($(filter %DBDD_GUARDS, $(CXXFLAGS)),)
811
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -s symex-driven-loading
912
else
1013
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -X bdd-expected-timeout -s symex-driven-loading
1114
endif
15+
endif
1216

1317
tests.log: ../$(CPROVER_DIR)/regression/test.pl
18+
ifndef ONLY_SYMEX_DRIVEN_LAZY_LOADING
1419
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation"
20+
endif
21+
ifndef SKIP_SYMEX_DRIVEN_LAZY_LOADING
1522
ifeq ($(filter %DBDD_GUARDS, $(CXXFLAGS)),)
1623
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -s symex-driven-loading
1724
else
1825
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -X bdd-expected-timeout -s symex-driven-loading
1926
endif
27+
endif
2028

2129
show:
2230
@for dir in *; do \

jbmc/regression/jbmc-generics/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,20 @@ default: tests.log
33
include ../../src/config.inc
44

55
test:
6+
ifndef ONLY_SYMEX_DRIVEN_LAZY_LOADING
67
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation"
8+
endif
9+
ifndef SKIP_SYMEX_DRIVEN_LAZY_LOADING
710
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -s symex-driven-loading
11+
endif
812

913
tests.log: ../$(CPROVER_DIR)/regression/test.pl
14+
ifndef ONLY_SYMEX_DRIVEN_LAZY_LOADING
1015
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation"
16+
endif
17+
ifndef SKIP_SYMEX_DRIVEN_LAZY_LOADING
1118
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -s symex-driven-loading
19+
endif
1220

1321
show:
1422
@for dir in *; do \

jbmc/regression/jbmc-strings/Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,32 @@ default: tests.log
33
include ../../src/config.inc
44

55
test:
6+
ifndef ONLY_SYMEX_DRIVEN_LAZY_LOADING
67
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation"
8+
endif
9+
ifndef SKIP_SYMEX_DRIVEN_LAZY_LOADING
710
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -s symex-driven-loading
11+
endif
812

913
testfuture:
1014
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation" -CF
15+
ifndef SKIP_SYMEX_DRIVEN_LAZY_LOADING
1116
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -CF -s symex-driven-loading
17+
endif
1218

1319
testall:
1420
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation" -CFTK
21+
ifndef SKIP_SYMEX_DRIVEN_LAZY_LOADING
1522
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -CFTK -s symex-driven-loading
23+
endif
1624

1725
tests.log: ../$(CPROVER_DIR)/regression/test.pl
26+
ifndef ONLY_SYMEX_DRIVEN_LAZY_LOADING
1827
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation"
28+
endif
29+
ifndef SKIP_SYMEX_DRIVEN_LAZY_LOADING
1930
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -s symex-driven-loading
31+
endif
2032

2133
show:
2234
@for dir in *; do \

jbmc/regression/jbmc/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,28 @@ default: tests.log
33
include ../../src/config.inc
44

55
test:
6+
ifndef ONLY_SYMEX_DRIVEN_LAZY_LOADING
67
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation"
8+
endif
9+
ifndef SKIP_SYMEX_DRIVEN_LAZY_LOADING
710
ifeq ($(filter %DBDD_GUARDS, $(CXXFLAGS)),)
811
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -s symex-driven-loading
912
else
1013
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -X bdd-expected-timeout -s symex-driven-loading
1114
endif
15+
endif
1216

1317
tests.log: ../$(CPROVER_DIR)/regression/test.pl
18+
ifndef ONLY_SYMEX_DRIVEN_LAZY_LOADING
1419
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation"
20+
endif
21+
ifndef SKIP_SYMEX_DRIVEN_LAZY_LOADING
1522
ifeq ($(filter %DBDD_GUARDS, $(CXXFLAGS)),)
1623
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -s symex-driven-loading
1724
else
1825
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -X bdd-expected-timeout -s symex-driven-loading
1926
endif
27+
endif
2028

2129
show:
2230
@for dir in *; do \

jbmc/regression/strings-smoke-tests/Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,32 @@ default: tests.log
33
include ../../src/config.inc
44

55
test:
6+
ifndef ONLY_SYMEX_DRIVEN_LAZY_LOADING
67
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation"
8+
endif
9+
ifndef SKIP_SYMEX_DRIVEN_LAZY_LOADING
710
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -s symex-driven-loading
11+
endif
812

913
testfuture:
1014
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation" -CF
15+
ifndef SKIP_SYMEX_DRIVEN_LAZY_LOADING
1116
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -CF -s symex-driven-loading
17+
endif
1218

1319
testall:
1420
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation" -CFTK
21+
ifndef SKIP_SYMEX_DRIVEN_LAZY_LOADING
1522
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -CFTK -s symex-driven-loading
23+
endif
1624

1725
tests.log: ../$(CPROVER_DIR)/regression/test.pl
26+
ifndef ONLY_SYMEX_DRIVEN_LAZY_LOADING
1827
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation"
28+
endif
29+
ifndef SKIP_SYMEX_DRIVEN_LAZY_LOADING
1930
@../$(CPROVER_DIR)/regression/test.pl -e -p -c "../../../src/jbmc/jbmc --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -s symex-driven-loading
31+
endif
2032

2133
show:
2234
@for dir in *; do \

0 commit comments

Comments
 (0)