-
Notifications
You must be signed in to change notification settings - Fork 139
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
Can't create expressions for concrete non-undef structs #134
Comments
The part of the compiler pass that handles expressions for structs is quite involved, as evidenced by the long comment in the function linked in the original issue description. I think it makes sense to try and improve it in general, rather than just adding one more special case. Let's collect the requirements...
The current implementation handles |
It is tempting to describe structs with trees of expressions... For example, the struct The advantage would be that |
This is a reproducer for #134.
This is a reproducer for #134.
This is a reproducer for #134.
This is a bug related to SymCC's handling of struct values in bitcode. The code that triggers it is the following:
%bar
is a symbolic value, so we need to create an expression for the constant{i8 1, i32 undef}
. The compiler pass generates the following code:That is, we write the struct to newly allocated memory and read it symbolically to get the expression. Unfortunately, the struct constant is fully concrete, so
_sym_read_memory
returnsnullptr
, which we promptly feed into_sym_build_insert
, causing a segfault.The text was updated successfully, but these errors were encountered: