-
Notifications
You must be signed in to change notification settings - Fork 274
Invariant check failed: Condition: expr.operands().size() == 3 #8276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The first problem (the XML report) is what we already know as #7073. Would you mind sharing the content of |
Right. |
It's a bummer that XML won't have arbitrary unicode -- I'll vote for doing C-style escaping. |
@ligurio Would you consider JSON as a workaround? |
However, with enabled
So removing option |
Could you please attach |
@tautschnig, sorry for a broken reproducing steps in description. $ git clone https://github.com/lua/lua
$ cd lua
$ make CC=goto-cc LD=goto-ld CFLAGS=-DLUA_USE_LINUX
$ cat << EOF > sample.c
> #include <assert.h>
int main()
{
return 0;
}
> EOF
$ goto-cc -I . -L . -llua -lm -o sample.goto sample.c
$ cbmc sample.goto --show-goto-functions --xml-ui
<snipped>
--- begin invariant violation report ---
Invariant check failed
File: ../src/util/std_expr.h:77 function: check
Condition: expr.operands().size() == 3
Reason: ternary expression must have three operands
Backtrace:
<snipped> |
I believe this will be fixed once #7885 is complete: the problem is a bug in |
Uh oh!
There was an error while loading. Please reload this page.
CBMC version: 5.95.1 (cbmc-5.95.1)
Operating system: Ubuntu 22.10 amd64
Exact command line resulting in the issue:
goto-cc -I /home/sergeyb/sources/cache/lua -L /home/sergeyb/sources/cache/lua -llua -lm -o lua_close.goto lua_close.c cbmc lua_close.goto --show-goto-functions --xml-ui > lua_close-property.xml
What behavior did you expect: successfully generated XML report
What happened instead: crash
Source code:
Without option
--xml-ui
:$ cbmc lua_close.goto --show-goto-functions --- begin invariant violation report --- Invariant check failed File: ../src/util/std_expr.h:77 function: check Condition: expr.operands().size() == 3 Reason: ternary expression must have three operands Backtrace: cbmc(+0xaccd60) [0x578e84374d60] cbmc(+0xacda39) [0x578e84375a39] cbmc(+0x1c46d4) [0x578e83a6c6d4] cbmc(+0xab2437) [0x578e8435a437] cbmc(+0x61b447) [0x578e83ec3447] cbmc(+0x61bcac) [0x578e83ec3cac] cbmc(+0x678d21) [0x578e83f20d21] cbmc(+0x678f3e) [0x578e83f20f3e] cbmc(+0x1c7b34) [0x578e83a6fb34] cbmc(+0x1cab31) [0x578e83a72b31] cbmc(+0x1c206f) [0x578e83a6a06f] cbmc(+0x1aebf9) [0x578e83a56bf9] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x73c910829d90] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x73c910829e40] cbmc(+0x1c3a05) [0x578e83a6ba05] --- end invariant violation report --- Aborted (core dumped)
GDB backtrace:
The text was updated successfully, but these errors were encountered: