Skip to content

fix type inconsistencies when using temporary #2498

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions jbmc/src/java_bytecode/java_bytecode_convert_method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3184,10 +3184,6 @@ void java_bytecode_convert_methodt::save_stack_entries(
{
for(auto &stack_entry : stack)
{
// remove typecasts if existing
while(stack_entry.id()==ID_typecast)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this will cause the code below to get hit much less often (looking for symbol, or deref, or member operator at top level) -- what is the upshot of this? Did this code ever have tests? If not this bug surely cries out for some, perhaps requested from @mgudemann as the original author?

stack_entry=to_typecast_expr(stack_entry).op();

// variables or static fields and symbol -> save symbols with same id
if((write_type==bytecode_write_typet::VARIABLE ||
write_type==bytecode_write_typet::STATIC_FIELD) &&
Expand Down