Skip to content

fix cast error for Operands with side effects#846

Merged
swissiety merged 1 commit intosoot-oss:developfrom
Timbals:fix/operand-side-effects
Feb 8, 2024
Merged

fix cast error for Operands with side effects#846
swissiety merged 1 commit intosoot-oss:developfrom
Timbals:fix/operand-side-effects

Conversation

@Timbals
Copy link
Copy Markdown
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.
@codecov
Copy link
Copy Markdown

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
Copy Markdown
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
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