foundry
foundry copied to clipboard
bug(`forge build`): Stack overflow caused by `FOUNDRY_LIBS` or `DAPP_LIBS` containing an absolute path
Component
Forge
Have you ensured that all of these are up to date?
- [X] Foundry
- [X] Foundryup
What version of Foundry are you on?
forge 0.2.0 (cc8e430 2024-10-16T00:22:08.572482504Z)
What command(s) is the bug in?
forge build
Operating System
Linux
Describe the bug
Steps to reproduce
- Push a temporary directory onto the stack
pushd "$(mktemp -d)"
- Create a forge project
forge init
- Build the project with the environment variable
FOUNDRY_LIBS
set to an array that contains an absolute path to a directory. Also works withDAPP_LIBS
. In this case, we use the absolute path to thelib
folder just created by theforge init
command.
FOUNDRY_LIBS=["$(pwd)/lib"] forge build
- This last command will exit with status code 134 and print the following error message.
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
Aborted (core dumped)