ICE on non-unique function names in `functionSideEffects` tests when constructing Yul call graph
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 29
Description
```
{
{
function f() {}
}
{
{
function f() {}
}
}
}
// ----
```
Copy contents to file named `test/libyul/functionSideEffects/scoped_redeclaration.yul`
Repro
```
isoltest -t functionSideEffects/scoped_redeclaration
Running tests...
functionSideEffects/scoped_redeclaration.yul: Exception during test: /solidity/libyul/optimiser/CallGraphGenerator.cpp(98): Throw in function virtual void solidity::yul::CallGraphGenerator::operator()(const solidity::yul::FunctionDefinition &)
Dynamic exception type: boost::wrapexcept
std::exception::what: Yul assertion failed
[solidity::util::tag_comment*] = Yul assertion failed
```
throws
https://github.com/ethereum/solidity/blob/efed3b2355b0840cfc884e383211f0a988937367/libyul/optimiser/CallGraphGenerator.cpp#L98
Contributor guide
Research direction
Start with test/libyul/functionSideEffects/scoped_redeclaration.yul and run isoltest -t functionSideEffects/scoped_redeclaration to reproduce the ICE. Read libyul/optimiser/CallGraphGenerator.cpp around line 98 and trace how the test's scoped, non-unique function names are handled. Done means the test no longer throws the Yul assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, solidity
- Domain
- compilers, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100