-
Notifications
You must be signed in to change notification settings - Fork 599
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Iteratively process basic blocks in try bodies
Summary: We currently recursively DFS through the CFG when identifying basic blocks associated with each catch. For very deep CFGs this can cause us to exceed the max stack depth and incorrectly report an error about nested try/catch statements. This behaviour is easily triggered if we have a huge number of try/catch blocks in a given function, because we then have 3 stack frames for each try (one each for the entry, body, and end). This diff rewrites the traversal code so that we process the entire try body iteratively, and only use recursion when we encounter another try within a try body. Reviewed By: tmikov Differential Revision: D29259502 fbshipit-source-id: 5867847094ebf83d539c6774876e0bfefe229d06
- Loading branch information
1 parent
66f0ca8
commit 4002156
Showing
3 changed files
with
432 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.