ethereum / solidity

Solidity, the Smart Contract Programming Language
https://soliditylang.org
GNU General Public License v3.0
22.79k stars 5.65k forks source link

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

Open alex1448 opened 3 months ago

alex1448 commented 3 months ago

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

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

Environment

nikola-matic commented 2 months ago

Hi @alex1448 and sorry for the late reply. Would you mind uploading the testcase file to a GH gist, we'd prefer not to download random zips?

alex1448 commented 2 months ago

Hello @nikola-matic, no worries and thank you for the reply. Sure, I created a GH gist, here is the link:

https://gist.github.com/alex1448/7fcd760fcddbf0edeb263e3d3a9cdd01

By the way, I would also like to add that obviously this testcase is not something that can occur in a real program, but I thought that it possibly exposes some otherwise hidden issue within the compiler.