Skip to content

Commit

Permalink
Merge #704: Track tree depth to avoid stack overflow
Browse files Browse the repository at this point in the history
14f0d7c Apply cargo fmt (Sanket Kanjalkar)
49a3cf1 Add offending test case (Sanket Kanjalkar)
3626712 Track miniscript tree depth explicitly (Sanket Kanjalkar)

Pull request description:

  We track tree depth at the time of parsing, but that is insufficient because wrappers also count towards the stack limit when creating `Miniscript` structure.

  We could also fix this by fixing the wrappers to be limited to size 10 or something(wrappers are only for transformation of types, they don't provide any additional functionality).

  Long term we want to move towards to complete non-recursive parsing, this is a good stop gap solution to address the current issues.

ACKs for top commit:
  apoelstra:
    ACK 14f0d7c

Tree-SHA512: 157ff56de164dd8ef96df4e3f3b379fe1c7663c969bec8825ea6ae3faed70ab4b14d7ad6b9e0cea4e97b86cb5fa159837317505bec8c03231dff5d1e545aa9b5
  • Loading branch information
apoelstra committed Jul 9, 2024
2 parents dc502f4 + 14f0d7c commit 5b0f5e3
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
Loading

0 comments on commit 5b0f5e3

Please # to comment.