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 Exception Flow Control - Update Trap Comparison (Issue 1175) #1176

Merged
merged 5 commits into from
Feb 6, 2025

Conversation

A1K28
Copy link
Contributor

@A1K28 A1K28 commented Feb 4, 2025

@A1K28 A1K28 changed the title Fu exception flow control - update trap comparison (Issue 1175) Fix Exception Flow Control - Update Trap Comparison (Issue 1175) Feb 4, 2025
@stschott stschott requested a review from swissiety February 5, 2025 10:07
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.

lets add a test (input is already pushed) that checks that the correct exceptional successor is linked. for simplicity sth like graph.getBlocks().stream().filter(b -> b.toString().contains("return o")).findFirst().get().getExceptionalSuccessors().values().stream().filter(ehb -> ehb.toString().contains("return 2")).findAny() == true; (beware: its possible the exceptionhandler consists of multiple blocks)

@A1K28
Copy link
Contributor Author

A1K28 commented Feb 5, 2025

@swissiety I've added the test as you requested. It's not completely generic, but it should suffice. Let me know if you want me to change anything.

@swissiety
Copy link
Collaborator

Wow thats a lot of assertions. Thank you for the testcase!

import java.util.HashMap;
import java.util.Map;

public class NestedTryCatchFlowTest {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please annotate it with the test category tag (see other tests with java8 something something)

@swissiety
Copy link
Collaborator

Please execute the coveo plugin with the fmt goal to apply the code style before committing

@A1K28
Copy link
Contributor Author

A1K28 commented Feb 5, 2025

i think i did. not sure if that's what you wanted

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.

Good work @A1K28 👍

@swissiety swissiety merged commit 2ca7164 into soot-oss:develop Feb 6, 2025
7 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.

[Bug]: Incorrect Exception Control Flow Analysis for Nested Try-Catch Blocks (1.3.0)
2 participants