Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 553c728

Browse files
committedDec 15, 2023
Add --no-malloc-fail to test runners
In order to keep existing tests passing.
1 parent 30145f5 commit 553c728

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed
 

‎regression/contracts-dfcc/chain.sh

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ else
4343
$goto_cc -o "${name}${dfcc_suffix}.gb" "${name}.c"
4444
fi
4545

46+
if [[ "${args_inst}" != *"malloc"* ]]; then
47+
args_inst="--no-malloc-fail $args_inst"
48+
fi
49+
4650
rm -f "${name}${dfcc_suffix}-mod.gb"
4751
$goto_instrument ${args_inst} "${name}${dfcc_suffix}.gb" "${name}${dfcc_suffix}-mod.gb"
4852
if [ ! -e "${name}${dfcc_suffix}-mod.gb" ] ; then

‎regression/goto-instrument/chain.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ else
2121
fi
2222

2323
rm -f "${target}-mod.gb"
24-
$goto_instrument ${args} "${target}.gb" "${target}-mod.gb"
24+
$goto_instrument --no-malloc-fail ${args} "${target}.gb" "${target}-mod.gb"
2525
if [ ! -e "${target}-mod.gb" ] ; then
2626
cp "${target}.gb" "${target}-mod.gb"
2727
elif echo $args | grep -q -- "--dump-c-type-header" ; then
@@ -39,5 +39,5 @@ elif echo $args | grep -q -- "--dump-c" ; then
3939

4040
rm "${target}-mod.c"
4141
fi
42-
$goto_instrument --show-goto-functions "${target}-mod.gb"
42+
$goto_instrument --no-malloc-fail --show-goto-functions "${target}-mod.gb"
4343
$cbmc --no-standard-checks "${target}-mod.gb"

‎regression/goto-synthesizer/chain.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fi
3737
rm -f "${name}-mod.gb"
3838
rm -f "${name}-mod-2.gb"
3939
echo "Running goto-instrument: "
40-
$goto_instrument ${args_inst} "${name}.gb" "${name}-mod.gb"
40+
$goto_instrument --no-malloc-fail ${args_inst} "${name}.gb" "${name}-mod.gb"
4141
if [ ! -e "${name}-mod.gb" ] ; then
4242
cp "$name.gb" "${name}-mod.gb"
4343
elif echo $args_inst | grep -q -- "--dump-c" ; then
@@ -53,9 +53,9 @@ elif echo $args_inst | grep -q -- "--dump-c" ; then
5353
fi
5454
echo "Running goto-synthesizer: "
5555
if echo $args_synthesizer | grep -q -- "--dump-loop-contracts" ; then
56-
$goto_synthesizer ${args_synthesizer} "${name}-mod.gb"
56+
$goto_synthesizer ${args_synthesizer} --no-malloc-fail "${name}-mod.gb"
5757
else
58-
$goto_synthesizer ${args_synthesizer} "${name}-mod.gb" "${name}-mod-2.gb"
58+
$goto_synthesizer ${args_synthesizer} --no-malloc-fail "${name}-mod.gb" "${name}-mod-2.gb"
5959
echo "Running CBMC: "
6060
$cbmc --no-standard-checks ${args_cbmc} "${name}-mod-2.gb"
6161
fi

0 commit comments

Comments
 (0)
Please sign in to comment.