Open
Description
Description
According to the EthDebug JSON schema, source range offsets must be non-negative integers, see: https://ethdebug.github.io/format/spec/materials/source-range
However, solc sets it to -1
in some cases.
Environment
- Compiler version: Version: 0.8.29+commit.ab55807c.Linux.g++
- Compilation pipeline (legacy, IR, EOF): IR
- Target EVM version (as per compiler settings): osaka
- Framework/IDE (e.g. Foundry, Hardhat, Remix): no
- EVM execution environment / backend / blockchain client: not applicable
- Operating system: WSL
Steps to Reproduce
solc --standard-json test/cmdlineTests/standard_output_debuginfo_ethdebug_compatible/input.json > output.json
The output.json
file contains four JUMPDEST instructions containing a negative offset, here is one such example:
{
"context": {
"code": {
"range": {
"length": 0,
"offset": -1
},
"source": {
"id": 0
}
}
},
"offset": 13,
"operation": {
"mnemonic": "JUMPDEST"
}
},