recurse_link infinite recursion for external library circular dependency crashes forge #5014
Closed
2 tasks done
Labels
T-bug
Type: bug
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (59f026f 2023-05-23T17:21:42.593814000Z)
What command(s) is the bug in?
forge test
Operating System
macOS (Apple Silicon)
Describe the bug
If two libs have external functions that call each other then recurse_link enters an infinite loop. It attempts to link Lib A to Lib B, then B to A, then A to B..., until a stack overflow. Below is a minimal repro demonstrating the issue
forge init
Counter.sol
RUST_LOG=forge forge test
The trace logs narrowed the issue down to
recurse_link
. Note this only happens when the lib's functions areexternal
.The text was updated successfully, but these errors were encountered: