File tree 3 files changed +9
-5
lines changed
3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -1045,7 +1045,7 @@ bool twols_parse_optionst::process_goto_program(
1045
1045
}
1046
1046
1047
1047
if (options.get_bool_option (" competition-mode" ))
1048
- assert_no_builtin_functions (goto_model);
1048
+ assert_no_unsupported_functions (goto_model);
1049
1049
1050
1050
make_scanf_nondet (goto_model);
1051
1051
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ class twols_parse_optionst:
185
185
void remove_dead_goto (goto_modelt &goto_model);
186
186
void memory_assert_info (goto_modelt &goto_model);
187
187
void handle_freed_ptr_compare (goto_modelt &goto_model);
188
- void assert_no_builtin_functions (goto_modelt &goto_model);
188
+ void assert_no_unsupported_functions (goto_modelt &goto_model);
189
189
void assert_no_atexit (goto_modelt &goto_model);
190
190
void fix_goto_targets (goto_modelt &goto_model);
191
191
void make_assertions_false (goto_modelt &goto_model);
Original file line number Diff line number Diff line change @@ -653,9 +653,12 @@ void twols_parse_optionst::handle_freed_ptr_compare(goto_modelt &goto_model)
653
653
}
654
654
}
655
655
656
- // / Add assertions preventing analysis of programs using GCC builtin functions
657
- // / that are not supported and can cause false results.
658
- void twols_parse_optionst::assert_no_builtin_functions (goto_modelt &goto_model)
656
+ // / Fail if the program contains any functions that 2LS does not currently
657
+ // / support. These include:
658
+ // / - builtin gcc functions
659
+ // / - longjmp (not supported by CBMC)
660
+ void twols_parse_optionst::assert_no_unsupported_functions (
661
+ goto_modelt &goto_model)
659
662
{
660
663
forall_goto_program_instructions (
661
664
i_it,
@@ -666,6 +669,7 @@ void twols_parse_optionst::assert_no_builtin_functions(goto_modelt &goto_model)
666
669
assert (
667
670
name.find (" __builtin_" )==std::string::npos &&
668
671
name.find (" __CPROVER_overflow" )==std::string::npos);
672
+ assert (name!=" longjmp" && name!=" _longjmp" && name!=" siglongjmp" );
669
673
670
674
if (i_it->is_assign ())
671
675
{
You can’t perform that action at this time.
0 commit comments