ethereum-optimism / ethereum-optimism/optimism
Syscall argument error is silently ignored
- Dominant language
- Go
- Stars
- 6.5k
- Forks
- 4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 145
Description
**Description**
This alignment is a fair assumption, and probably required for C ABI compliance. But as far as defensive programming goes, it is better to fail if the address is misaligned than to silently align it.
**Recommendation**
Fail if the pointer is misaligned.
[packages/contracts-bedrock/src/cannon/MIPS64.sol](https://cantina.xyz/code/4ea41142-4359-4f62-bfaa-a542172cab5d/packages/contracts-bedrock/src/cannon/MIPS64.sol#L584)
uint64 effAddr = a1 & arch.ADDRESS_MASK;
Contributor guide
Research direction
Start in packages/contracts-bedrock/src/cannon/MIPS64.sol at the syscall argument handling around line 584. Trace how a1 is masked with arch.ADDRESS_MASK and inspect nearby syscall logic and tests, if present. Done means a misaligned pointer causes an explicit failure instead of being silently aligned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100