Skip to content

Commit 49fb197

Browse files
authored
Merge pull request #6576 from tautschnig/cleanup/init-function-updates
Make re-building __CPROVER_initialize safe
2 parents bd1b8c2 + e631369 commit 49fb197

File tree

48 files changed

+402
-491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+402
-491
lines changed

doc/cprover-manual/properties.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,3 +412,9 @@ those two options are used, CBMC will assume that `malloc` does not fail.
412412
Malloc may also fail for external reasons which are not modelled by CProver. If
413413
you want to replicate this behaviour use the option `--malloc-may-fail` in
414414
conjunction with one of the above modes of failure.
415+
416+
These malloc failure options need to be set when the C library model is added to
417+
the program. Typically this is upon invoking CBMC, but if the user has chosen to
418+
do so via `goto-instrument --add-library`, then the malloc failure mode needs to
419+
be specified with that `goto-instrument` invocation, i.e., as an option to
420+
`goto-instrument`.

jbmc/src/jbmc/jbmc_parse_options.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -721,10 +721,6 @@ int jbmc_parse_optionst::get_goto_program(
721721

722722
goto_modelt &goto_model = dynamic_cast<goto_modelt &>(*goto_model_ptr);
723723

724-
// if we added the ansi-c library models here this should also call
725-
// add_malloc_may_fail_variable_initializations(goto_model);
726-
// here
727-
728724
if(cmdline.isset("validate-goto-model"))
729725
{
730726
goto_model.validate();

regression/goto-analyzer/constant_propagation_01/test-vsd.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=0$
55
^SIGNAL=0$
66
^Simplified: assert: 1, assume: 0, goto: 1, assigns: 7, function calls: 0$
7-
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 16, function calls: 2$
7+
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 14, function calls: 2$
88
--
99
^warning: ignoring

regression/goto-analyzer/constant_propagation_01/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=0$
55
^SIGNAL=0$
66
^Simplified: assert: 1, assume: 0, goto: 1, assigns: 7, function calls: 0$
7-
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 16, function calls: 2$
7+
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 14, function calls: 2$
88
--
99
^warning: ignoring

regression/goto-analyzer/constant_propagation_02/test-vsd.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=0$
55
^SIGNAL=0$
66
^Simplified: assert: 1, assume: 0, goto: 1, assigns: 8, function calls: 0$
7-
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 15, function calls: 2$
7+
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 13, function calls: 2$
88
--
99
^warning: ignoring

regression/goto-analyzer/constant_propagation_02/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=0$
55
^SIGNAL=0$
66
^Simplified: assert: 1, assume: 0, goto: 1, assigns: 8, function calls: 0$
7-
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 15, function calls: 2$
7+
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 13, function calls: 2$
88
--
99
^warning: ignoring

regression/goto-analyzer/constant_propagation_03/test-vsd.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=0$
55
^SIGNAL=0$
66
^Simplified: assert: 1, assume: 0, goto: 1, assigns: 8, function calls: 0$
7-
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 15, function calls: 2$
7+
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 13, function calls: 2$
88
--
99
^warning: ignoring

regression/goto-analyzer/constant_propagation_03/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=0$
55
^SIGNAL=0$
66
^Simplified: assert: 1, assume: 0, goto: 1, assigns: 8, function calls: 0$
7-
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 15, function calls: 2$
7+
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 13, function calls: 2$
88
--
99
^warning: ignoring

regression/goto-analyzer/constant_propagation_04/test-vsd.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=0$
55
^SIGNAL=0$
66
^Simplified: assert: 1, assume: 0, goto: 1, assigns: 8, function calls: 0$
7-
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 15, function calls: 2$
7+
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 13, function calls: 2$
88
--
99
^warning: ignoring

regression/goto-analyzer/constant_propagation_04/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ main.c
44
^EXIT=0$
55
^SIGNAL=0$
66
^Simplified: assert: 1, assume: 0, goto: 1, assigns: 8, function calls: 0$
7-
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 15, function calls: 2$
7+
^Unmodified: assert: 0, assume: 0, goto: 0, assigns: 13, function calls: 2$
88
--
99
^warning: ignoring

0 commit comments

Comments
 (0)