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 cast error for Operands with side effects #846

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

Timbals
Copy link
Contributor

@Timbals Timbals commented Feb 8, 2024

Operands that can be used as both a statement and an expression could throw a cast exception. This was not noticed earlier because AsmMethodSource::getStmt is generic and therefore no actual cast was visible in the source code.

I also added a testcase for this behavior.

(This was originally discovered while working on #841 in the method <java.net.URI: java.lang.String decode(java.lang.String,boolean)>)

`Operand`s that can be used as both a statement and an expression could throw a cast exception. This was not noticed earlier because `AsmMethodSource::getStmt` is generic and therefore no actual cast was visible in the source code.
Copy link

codecov bot commented Feb 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (84b98b6) 63.74% compared to head (c4d7208) 64.05%.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #846      +/-   ##
=============================================
+ Coverage      63.74%   64.05%   +0.31%     
- Complexity      3417     3435      +18     
=============================================
  Files            312      312              
  Lines          15086    15087       +1     
  Branches        2559     2559              
=============================================
+ Hits            9616     9664      +48     
+ Misses          4557     4513      -44     
+ Partials         913      910       -3     

☔ 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.

Nice. Thx for your contribution!

@swissiety swissiety merged commit d61e334 into soot-oss:develop Feb 8, 2024
9 checks passed
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.

2 participants