Comments (3)
@thomasspriggs Thank you for the analysis! Minor correction: the string s
should not contain __CPROVER_bitvector
to enter that branch. With the anonymous members we might end up with padding in the declaration, and that padding might be of said type. Assigning to myself as I am at fault for most of this code.
from cbmc.
Update:
Seems like the problem concerns any anonymous structs and unions.
struct struct1 {
struct { // <- "struct tmp" would have worked
char a;
void *addr;
};
};
int main () { struct struct1 b; }
from cbmc.
I have taken a quick look at this to ensure that it can be reproduced. As the INVARIANT violation is missing I have included it below, for reference of anyone undertaking further work to debug this issue -
--- begin invariant violation report ---
Invariant check failed
File: /home/tspriggs/Development/cbmc/src/goto-instrument/dump_c.cpp:623 function: convert_compound
Condition: false
Reason: Unreachable
Backtrace:
This condition is found here -
cbmc/src/goto-instrument/dump_c.cpp
Line 623 in 8a8ecc8
I am not entirely sure what the code block beginning on line 549 is attempting to achieve or what the fix should be. I think it is something like an initial attempt is made to serialise the type as string s
. If the string contains CPROVER_bitvector
then enter special case to print the the type based on the C integer type instead of the internal type. However the CPROVER_bitvector
type is the type of a nested field and the special cases matching signed/unsigned bit vectors are mismatched as the type node in the AST in this case is a struct/union.
I am not planning to look at this further for the moment. But I thought my initial findings may be useful when someone continues the debugging effort.
from cbmc.
Related Issues (20)
- Unexpected result for struct member with bit fields.
- CBMC gives unexpected result in equivalent transformation.
- Whether cbmc supports built-in functions? HOT 1
- CBMC deals with mmap and munmap in pointer check.
- abs() >=0 assertion failed HOT 5
- The transformation between pointer and array of type char16_t & char32_t.
- The size of the first dimension is omitted when the array is defined. HOT 2
- C code has extern keyword in pointer check. HOT 4
- issues with auto-objects
- [Safety feature] Error when enforcing contracts twice
- [Question] Could not find goto-cc in the windows MSI HOT 2
- [Question] Minimum requirements for running CBMC in windows HOT 4
- [RFC] Build system support in CBMC version 6 HOT 4
- Compilation error on ARM64 Linux HOT 1
- CBMC documentation HOT 4
- html report of CBMC runs HOT 1
- tests: regressions when compiling `cbmc` with `-Wp,-D_GLIBCXX_ASSERTIONS` HOT 3
- question - I would like to see a concise list of pragmas, and what they relate to
- Use of `alloca` without declaring it causes INVARIANT violation on Windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cbmc.