argotorg / argotorg/solidity

Segmentation fault for a really long variable declaration statement with --via-ir

Open
#14,995 2 comments 0 reactions 0 assignees View on GitHub
bug :bug:
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
21

Description

## Description

The compiler segfaults when trying to compile a really long tuple assignment with ```--via-ir```, tested with latest solc version ```0.8.25```. The attached program has 1750 variables in a single variable declaration statement but it doesn't have to be this number necessarily. I don't know if this is something that the team would want to investigate, but in any case I thought to open this issue.

[testcase.zip](https://github.com/ethereum/solidity/files/14894578/testcase.zip)

```
solc --asm --via-ir testcase.sol
```

## Environment

- Compiler version: ```0.8.25```

Contributor guide

Open the contributing guide

Research direction

Reproduce the crash with testcase.zip using `solc --asm --via-ir testcase.sol` and compiler version 0.8.25. Compare the 1,750-variable tuple declaration with smaller declarations, then trace the --via-ir compilation path to locate the failure. Done means the testcase no longer segfaults and coverage exists for this long declaration.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, solidity
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.