Skip to content

Commit a73ab0d

Browse files
committed
Adjust proof tooling to support CBMC v6
With CBMC v6, unwinding assertions as well as other checks are enabled by default.
1 parent 875bfd2 commit a73ab0d

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ jobs:
406406
- name: Set up CBMC runner
407407
uses: FreeRTOS/CI-CD-Github-Actions/set_up_cbmc_runner@main
408408
with:
409-
cbmc_version: "5.95.1"
409+
cbmc_version: "6.1.1"
410410

411411
- env:
412412
stepName: Install Dependencies

test/cbmc/proofs/Makefile.template

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ goto:
124124
# report if the proof failed. If the proof failed, we separately fail
125125
# the entire job using the check-cbmc-result rule.
126126
cbmc.xml: $(ENTRY).goto
127-
-cbmc $(CBMCFLAGS) $(SOLVER) --unwinding-assertions --trace --xml-ui @RULE_INPUT@ > $@ 2>&1
127+
-cbmc $(CBMCFLAGS) $(SOLVER) --trace --xml-ui @RULE_INPUT@ > $@ 2>&1
128128

129129
property.xml: $(ENTRY).goto
130-
cbmc $(CBMCFLAGS) --unwinding-assertions --show-properties --xml-ui @RULE_INPUT@ > $@ 2>&1
130+
cbmc $(CBMCFLAGS) --show-properties --xml-ui @RULE_INPUT@ > $@ 2>&1
131131

132132
coverage.xml: $(ENTRY).goto
133-
cbmc $(CBMCFLAGS) --cover location --xml-ui @RULE_INPUT@ > $@ 2>&1
133+
cbmc $(CBMCFLAGS) --no-standard-checks --malloc-may-fail --malloc-fail-null --cover location --xml-ui @RULE_INPUT@ > $@ 2>&1
134134

135135
cbmc: cbmc.xml
136136

test/cbmc/proofs/MakefileCommon.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232

3333
"CBMCFLAGS ": [
3434
"--object-bits 8",
35-
"--32",
36-
"--bounds-check",
37-
"--pointer-check"
35+
"--32"
3836
],
3937

4038
"FORWARD_SLASH": ["/"],

test/cbmc/proofs/UDP/vProcessGeneratedUDPPacket/Makefile.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"ENTRY": "vProcessGeneratedUDPPacket",
33
"CBMCFLAGS":
44
[
5+
"--unwind 1",
6+
"--unwindset FreeRTOS_InterfaceEndPointOnNetMask.0:3",
7+
"--nondet-static"
58
],
69
"OBJS":
710
[

test/cbmc/proofs/run-cbmc-proofs.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def add_proof_jobs(proof_directory, proof_root):
186186

187187
# Run 3 CBMC tasks
188188

189-
cbmc_out = str(proof_directory / "cbmc.txt")
189+
cbmc_out = str(proof_directory / "cbmc.xml")
190190
run_cmd([
191191
"litani", "add-job",
192192
"--command", "make cbmc",
@@ -301,12 +301,12 @@ def main():
301301
if not args.no_standalone:
302302
run_build(args.parallel_jobs)
303303

304-
out_sym = pathlib.Path("/tmp")/"litani"/"runs"/"latest"
305-
out_dir = out_sym.resolve()
304+
out_sym = pathlib.Path("/tmp")/"litani"/"runs"/"latest"
305+
out_dir = out_sym.resolve()
306306

307-
local_copy = pathlib.Path("output")/"latest"
308-
local_copy.parent.mkdir(exist_ok=True)
309-
local_copy.symlink_to(out_dir)
307+
local_copy = pathlib.Path("output")/"latest"
308+
local_copy.parent.mkdir(exist_ok=True)
309+
local_copy.symlink_to(out_dir)
310310

311311

312312
if __name__ == "__main__":

0 commit comments

Comments
 (0)