Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault when assigning to a parenthesized non-tuple expression of a tuple type #15075

Closed
Subway2023 opened this issue May 3, 2024 · 1 comment · Fixed by #15084
Assignees
Labels
bug 🐛 low effort There is not much implementation work to be done. The task is very easy or tiny. low impact Changes are not very noticeable or potential benefits are limited. should report better error Error is just badly reported. Should be a proper type error - source is not fine.

Comments

@Subway2023
Copy link

Environment

  • Compiler version: 0.8.25
  • Target EVM version (as per compiler settings): None
  • Framework/IDE (e.g. Truffle or Remix): None
  • EVM execution environment / backend / blockchain client: Command
  • Operating system: Linux

Steps to Reproduce

contract A {
    function f ( ) internal virtual {
        ( ( f() ) -= f() ) [ f() ] ;
    }
}

Segmentation fault

@r0qs r0qs added easy difficulty low effort There is not much implementation work to be done. The task is very easy or tiny. labels May 8, 2024
@r0qs r0qs changed the title Segmentation fault Segmentation fault when resolving empty left hand side tuple expression May 8, 2024
@r0qs
Copy link
Member

r0qs commented May 8, 2024

Hi @Subway2023 thanks for opening the issue. We are indeed incorrectly detecting assignments to empty tuple expressions. I opened a PR to fix it ;)

A simpler reproduction of the bug would be:

contract C {
    function f() {
        (f()) = ();
    }
}

@cameel cameel added low impact Changes are not very noticeable or potential benefits are limited. and removed easy difficulty labels May 8, 2024
@cameel cameel changed the title Segmentation fault when resolving empty left hand side tuple expression Segmentation fault when assigning to a parenthesized non-tuple expression of a tuple type May 10, 2024
@cameel cameel added the should report better error Error is just badly reported. Should be a proper type error - source is not fine. label May 10, 2024
@r0qs r0qs self-assigned this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 low effort There is not much implementation work to be done. The task is very easy or tiny. low impact Changes are not very noticeable or potential benefits are limited. should report better error Error is just badly reported. Should be a proper type error - source is not fine.
Projects
None yet
3 participants