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
[C++ VERIFICATION] Improved cpp new and delete #1648
Conversation
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 have two comments here.
CORE | ||
main.cpp | ||
|
||
^VERIFICATION SUCCESSFUL$ |
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.
There is a memory leak in this program.
Can you please create another test case that enables --memory-leak-leak?
foo->Increment(); // Incrementing the value | ||
|
||
foo->Execute(); // Executing | ||
|
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.
Can you also create another test case that adds the delete to mark it as VERIFICATION SUCCESSFUL?
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.
You can unify both branches by casting *code2
to the common base class const code_expression_data &
. Otherwise LGTM.
Hi @fbrausse, Thanks for your advice, I tried this, but cmake complained about it.
different types ‘code_cpp_delete2t’ and ‘code_cpp_del_array2t’. Or do we have a general type cast function? |
|
Great, thanks |
Thanks for submitting this PR, @XLiZHI. |
Fixed C++ dangling pointer checking.
Fixed C++ double delete.
Next PR todo: move the adjustment of cpp new and delete into symex.
still wait for #1644