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

Fix segmentation fault when assigning to a parenthesized non-tuple expression of a tuple type #15084

Merged
merged 1 commit into from May 14, 2024

Conversation

r0qs
Copy link
Member

@r0qs r0qs commented May 8, 2024

Fixes #15075

@r0qs r0qs requested a review from cameel May 8, 2024 13:54
@r0qs r0qs changed the title Fix segmentation fault when resolving empty left hand side tuple-type Fix segmentation fault when resolving empty left hand side tuple expression May 8, 2024
@r0qs r0qs force-pushed the fix-segfault-tuple-expression branch 2 times, most recently from 184d65f to ad74d10 Compare May 8, 2024 14:23
Copy link
Member

@cameel cameel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new condition is technically incorrect (or rather makes unnecessary assumptions), though cases that it would process incorrectly are currently impossible in the language, so the code is not buggy despite this. I think it would still be better to correct it before we merge the PR.

libsolidity/analysis/TypeChecker.cpp Outdated Show resolved Hide resolved
@r0qs r0qs force-pushed the fix-segfault-tuple-expression branch 2 times, most recently from 0b0192c to 0646e8f Compare May 10, 2024 17:26
@r0qs r0qs changed the title Fix segmentation fault when resolving empty left hand side tuple expression Fix segmentation fault when resolving to empty left hand side tuple type May 10, 2024
@r0qs r0qs force-pushed the fix-segfault-tuple-expression branch from 0646e8f to c88b3cf Compare May 10, 2024 17:31
Changelog.md Outdated Show resolved Hide resolved
cameel
cameel previously approved these changes May 10, 2024
Copy link
Member

@cameel cameel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to tentatively approve it since my only remaining problem here is wording and comments, but would still be good if those could be corrected before we merge.

@cameel cameel changed the title Fix segmentation fault when resolving to empty left hand side tuple type Fix segmentation fault when assigning to resolving to a parenthesized non-tuple expression of a tuple type May 10, 2024
@cameel cameel changed the title Fix segmentation fault when assigning to resolving to a parenthesized non-tuple expression of a tuple type Fix segmentation fault when assigning to a parenthesized non-tuple expression of a tuple type May 10, 2024
@r0qs r0qs self-assigned this May 13, 2024
@r0qs r0qs force-pushed the fix-segfault-tuple-expression branch 5 times, most recently from b8eb208 to 3ec1ed6 Compare May 13, 2024 14:42
@r0qs r0qs force-pushed the fix-segfault-tuple-expression branch from 6efbf56 to e53197d Compare May 14, 2024 07:58
@r0qs r0qs requested a review from cameel May 14, 2024 07:59
@r0qs r0qs force-pushed the fix-segfault-tuple-expression branch from e53197d to 3b4d9bb Compare May 14, 2024 08:19
@r0qs r0qs force-pushed the fix-segfault-tuple-expression branch from a86dd89 to 2d0fcb0 Compare May 14, 2024 08:53
…pression of a tuple type

Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
@r0qs r0qs force-pushed the fix-segfault-tuple-expression branch from 2d0fcb0 to 5ffd39a Compare May 14, 2024 08:54
@r0qs r0qs enabled auto-merge May 14, 2024 09:17
@r0qs r0qs merged commit d249926 into develop May 14, 2024
70 of 71 checks passed
@r0qs r0qs deleted the fix-segfault-tuple-expression branch May 14, 2024 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segmentation fault when assigning to a parenthesized non-tuple expression of a tuple type
2 participants