-
Notifications
You must be signed in to change notification settings - Fork 274
cbmc --verbosity 10 --xml-ui invariant failure #7038
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
This is a real pain that has bitten a few of us recently. It's really hard to debug for the user as it gives you no hint as to where and in what file you need to find the offending character. |
The 128-255 range does potentially open up a can of character encoding worms. But they certainly correspond to printable characters for (code page dependant) extended ascii or part of a multi-byte sequence for many printable UTF-8 characters. In this case I think it is the ⇔ character which is encoded as 0xE2 0x87 0x94 or 226 135 148 in decimal. This is from the line I agree with Mark's assessment. The check should probably be |
PR #7109 which should address this issue has now been merged. @markrtuttle Can you confirm whether you are satisfied with the current solution so we can close out this issue? |
Thanks you @thomasspriggs for fixing the bug that I had introduced! I had just failed to take into account signedness. |
CBMC version: 5.61.0
Operating system: MacOS 11.6.7
Create the file
main.c
and run the command
and
cbmc
fails withI think the problem is that
--verbosity 10
generates lines likeand the character
¬
is extended ASCII character 170 (I can't explain the 226 in the error message). In xml.cpp, line 113 asserts the data invariantch > ' '
but sincech=170
interpreted as a signed character is negative, the assertion fails and the invariant failure is thrown. I think the checkch > ' '
is intended to skip the unprintable characters below the space character in ASCII, but I think the extended ASCII characters above 128 are mostly printable characters and should be okay.The text was updated successfully, but these errors were encountered: