Skip to content
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

fix immediate inlining over trap ranges #824

Merged

Conversation

Timbals
Copy link
Contributor

@Timbals Timbals commented Jan 18, 2024

To do this, each Operand keeps track of which trap handlers are active at the instruction that it was created.
When these active trap handlers differ at the place where the Operand is used, it is not inlined.

Closes #802
Supersedes #803

Monitors should maybe get the same treatment as well, but in practice this shouldn't be an issue because (at least to my knowledge) compilers are required to generate trap ranges over monitor ranges.

swissiety and others added 5 commits January 18, 2024 15:20
To do this, each `Operand` keeps track of which trap handlers are active at the instruction that it was created.
When these active trap handlers differ at the place where the `Operand` is used, it is not inlined.
I didn't test this since I couldn't even think of an example where this makes a difference.
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (3c0b759) 63.57% compared to head (de6ec87) 63.60%.

Files Patch % Lines
...sootup/java/bytecode/frontend/AsmMethodSource.java 93.75% 1 Missing ⚠️
...in/java/sootup/java/bytecode/frontend/Operand.java 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #824      +/-   ##
=============================================
+ Coverage      63.57%   63.60%   +0.02%     
- Complexity      3427     3430       +3     
=============================================
  Files            313      313              
  Lines          15145    15161      +16     
  Branches        2565     2569       +4     
=============================================
+ Hits            9629     9643      +14     
  Misses          4610     4610              
- Partials         906      908       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@swissiety swissiety left a comment

Choose a reason for hiding this comment

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

looks good - thanks :)

@swissiety swissiety merged commit 36a9654 into soot-oss:develop Jan 18, 2024
9 checks passed
@Timbals Timbals deleted the fix/immediate-inlining-over-trap-ranges branch January 19, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A runtime exception bug when SootUp analyzed a class file
2 participants