-
Notifications
You must be signed in to change notification settings - Fork 102
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
Fixed crash caused by invalid id in value set #1514
Conversation
src/pointer-analysis/value_set.cpp
Outdated
@@ -1288,7 +1288,7 @@ void value_sett::assign_rec( | |||
else if( | |||
is_constant_string2t(lhs) || is_null_object2t(lhs) || | |||
is_valid_object2t(lhs) || is_deallocated_obj2t(lhs) || | |||
is_dynamic_size2t(lhs) || is_constant_array2t(lhs)) | |||
is_dynamic_size2t(lhs) || is_constant_array2t(lhs) || is_invalid2t(lhs)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check should be done where the invalid2t expression is obtained originally in the recursion: in the is_dereference2t(lhs)
branch. The reason is that when possible we should handle the "special" value-set expressions unknown2t
, invalid2t
, etc. together, such that it's clear that assign_rec()
itself only handles the non-special ones; i.e., the special should not escape.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @XLiZHI, LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this PR, @XLiZHI.
ESBMC should not crash for program.
For some code that directly manipulated memory, this would cause our static analysis module to crash.