Tag too large for reserved space
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 21
Description
## Description
Solidity raised the following exception:
```
/solidity/libsolidity/interface/CompilerStack.cpp(1476): Throw in function void solidity::frontend::CompilerStack::assembleYul(const solidity::frontend::ContractDefinition&, std::shared_ptr, std::shared_ptr)
Dynamic exception type: boost::wrapexcept
std::exception::what: Assembly exception for bytecode: Tag too large for reserved space.
[solidity::util::tag_comment*] = Assembly exception for bytecode: Tag too large for reserved space.
```
## Environment
- Compiler version: 0.8.29
- Compilation pipeline: IR
- Target EVM version: Cancun
- Framework: Foundry
- Operating system: Ubuntu 22.04.3 LTS
## Steps to Reproduce
I was not able to create a minimal example, sorry.
Here are the steps to reproduce the bug in our codebase:
- Clone [`cartesi/rollups-contracts`](https://github.com/cartesi/rollups-contracts).
- Go to branch [`solc-bug`](https://github.com/cartesi/rollups-contracts/tree/solc-bug) or commit [`92163202`](https://github.com/cartesi/rollups-contracts/commit/92163202a1ac5fb9a29a29eca1808615105943be).
- Install the Soldeer dependencies with `forge soldeer install`.
- Attempt to build the Forge project with `forge build`.
- The build should fail with the error message at the beginning of this issue.
Contributor guide
Research direction
Start at libsolidity/interface/CompilerStack.cpp:1476 and reproduce the failure by cloning cartesi/rollups-contracts at commit 92163202, installing Soldeer dependencies, and running forge build. Trace the IR compilation path that produces “Tag too large for reserved space”; done means the reported project compiles successfully or the issue has a minimal, reliable reproduction and a verified fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, solidity
- Domain
- blockchain, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100