-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It turns out that we missed another case where the stack could overflow: dropping a deeply nested Hir. Namely, since we permit deeply nested Hirs to be constructed and only reject them after determining they are too deeply nested, they still then need to be dropped. We fix this by implementing a custom a Drop impl that uses the heap to traverse the Hir and drop things without using unbounded stack space. An alternative way to fix this would be to adjust the parser somehow to avoid building deeply nested Hir values in the first place. But that seems trickier, so we just stick with this for now.
- Loading branch information
1 parent
4ae1472
commit 0086dec
Showing
3 changed files
with
65 additions
and
3 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
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