Skip to content

Commit 77befb9

Browse files
author
Enrico Steffinlongo
committed
Renamed no-malloc-fail to no-malloc-may-fail to mirror malloc-may-fail
1 parent c3635b1 commit 77befb9

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

doc/man/cbmc.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ do not check that all pointers in pointer primitives are valid or null
102102
\fB\-\-no\-signed\-overflow\-check\fR
103103
disable signed arithmetic over\- and underflow checks
104104
.TP
105-
\fB\-\-no\-malloc\-fail\fR
106-
Do not allow malloc calls to fail by default.
105+
\fB\-\-no\-malloc\-may\-fail\fR
106+
do not allow malloc calls to fail by default
107107
.TP
108108
\fB\-\-no\-unwinding\-assertions\fR (\fBcbmc\fR\-only)
109109
do not generate unwinding assertions (cannot be

doc/man/goto-analyzer.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,8 @@ do not check that all pointers in pointer primitives are valid or null
634634
\fB\-\-no\-signed\-overflow\-check\fR
635635
disable signed arithmetic over\- and underflow checks
636636
.TP
637-
\fB\-\-no\-malloc\-fail\fR
638-
Do not allow malloc calls to fail by default.
637+
\fB\-\-no\-malloc\-may\-fail\fR
638+
do not allow malloc calls to fail by default
639639
.TP
640640
\fB\-\-no\-unwinding\-assertions\fR (\fBcbmc\fR\-only)
641641
do not generate unwinding assertions (cannot be

doc/man/goto-instrument.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,8 +697,8 @@ set malloc failure mode to assert\-then\-assume
697697
\fB\-\-malloc\-fail\-null\fR
698698
set malloc failure mode to return null
699699
.TP
700-
\fB\-\-no\-malloc\-fail\fR
701-
Do not allow malloc calls to fail by default.
700+
\fB\-\-no\-malloc\-may\-fail\fR
701+
do not allow malloc calls to fail by default
702702
.TP
703703
\fB\-\-string\-abstraction\fR
704704
track C string lengths and zero\-termination

src/util/config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ bool configt::set(const cmdlinet &cmdline)
11301130
{
11311131
ansi_c.malloc_may_fail = true;
11321132
}
1133-
if(cmdline.isset("no-malloc-fail"))
1133+
if(cmdline.isset("no-malloc-may-fail"))
11341134
{
11351135
ansi_c.malloc_may_fail = false;
11361136
ansi_c.malloc_failure_mode = ansi_ct::malloc_failure_mode_none;

src/util/config.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,16 @@ class symbol_table_baset;
7070
" {y--no-library} \t disable built-in abstract C library\n"
7171

7272
#define OPT_CONFIG_LIBRARY \
73-
"(malloc-fail-assert)(malloc-fail-null)(malloc-may-fail)(no-malloc-fail)" \
73+
"(malloc-fail-assert)(malloc-fail-null)(malloc-may-fail)" \
74+
"(no-malloc-may-fail)" \
7475
"(string-abstraction)"
7576

7677
#define HELP_CONFIG_LIBRARY \
7778
" {y--malloc-may-fail} \t allow malloc calls to return a null pointer\n" \
79+
" {y--no-malloc-may-fail} \t disable potential malloc failure\n" \
7880
" {y--malloc-fail-assert} \t " \
7981
"set malloc failure mode to assert-then-assume\n" \
8082
" {y--malloc-fail-null} \t set malloc failure mode to return null\n" \
81-
" {y--no-malloc-fail} \t Disable potential malloc failure.\n" \
8283
" {y--string-abstraction} \t track C string lengths and zero-termination\n"
8384

8485
#define OPT_CONFIG_JAVA "(classpath)(cp)(main-class)"

0 commit comments

Comments
 (0)