argotorg / argotorg/solidity

Missing revert messages for some calldata validations

Open
#16,660 2 comments 0 reactions 0 assignees View on GitHub
bug :bug: low effort low impact must have eventually
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.