Missing revert messages for some calldata validations
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 21
Description
Related to https://github.com/argotorg/solidity/pull/16483#discussion_r2829800249
## Description
ABI coder v2 replaced cleanup with validations that reject dirty value (#5844). However the corresponding revert has empty return data even when full revert messages are requested with `--revert-strings debug`.
The revert happens in `validatorFunction()`, used by ABI utilities. It was likely missed when error messages were added, because it sits in `YulUtilFunctions`.
https://github.com/argotorg/solidity/blob/402ee27947fa341069d76395b4d4ae2b83cf266e/libsolidity/codegen/YulUtilFunctions.cpp#L4105
## Environment
- Compiler version: 0.8.35
## Steps to Reproduce
```solidity
pragma abicoder v2;
contract C {
function f(bool) public pure {}
}
// ====
// revertStrings: debug
// ----
// f(bool): 2 -> FAILURE
```
Contributor guide
Research direction
Start with validatorFunction() in libsolidity/codegen/YulUtilFunctions.cpp around the linked location, then reproduce the Solidity example with --revert-strings debug. Trace the ABI coder v2 dirty-value validation and confirm that the failure produces the expected non-empty revert message instead of empty return data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, solidity
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100