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

Workaround: Do not inline functions that have pointer args #4899

Merged
merged 8 commits into from
Aug 2, 2023

Conversation

vaivaswatha
Copy link
Contributor

This reverts the inliner change that was done in #4823.

Without this, when sharing stack data across contract boundaries, we end up with an illegal access.

@IGI-111 IGI-111 marked this pull request as ready for review August 2, 2023 12:12
@IGI-111 IGI-111 requested a review from a team August 2, 2023 12:12
@IGI-111 IGI-111 added bug Something isn't working P: critical Should be looked at before anything else compiler: ir IRgen and sway-ir including optimization passes labels Aug 2, 2023
anton-trunov
anton-trunov previously approved these changes Aug 2, 2023
tritao
tritao previously approved these changes Aug 2, 2023
@IGI-111 IGI-111 dismissed stale reviews from tritao and anton-trunov via ea7b0bd August 2, 2023 15:33
@IGI-111 IGI-111 force-pushed the vaivaswatha/inliner_workaround branch 2 times, most recently from f0682fa to 72b4961 Compare August 2, 2023 16:05
@IGI-111 IGI-111 force-pushed the vaivaswatha/inliner_workaround branch from 72b4961 to 66cc3d6 Compare August 2, 2023 16:30
@IGI-111 IGI-111 requested review from anton-trunov, tritao and a team August 2, 2023 16:46
@IGI-111 IGI-111 requested a review from a team August 2, 2023 16:49
@IGI-111 IGI-111 merged commit 1cb1a46 into master Aug 2, 2023
29 checks passed
@IGI-111 IGI-111 deleted the vaivaswatha/inliner_workaround branch August 2, 2023 17:07
vaivaswatha added a commit that referenced this pull request Mar 23, 2024
The new encoding can handle functions with pointer arguments.

So this change reverts #4899.

Also see #2819, which first introduced this hack.
vaivaswatha added a commit that referenced this pull request Apr 16, 2024
The new encoding can handle functions with pointer arguments.

So this change reverts #4899. That PR also added a test which now passes
without the forced inlining.

Also see #2819, which first introduced this hack.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler: ir IRgen and sway-ir including optimization passes P: critical Should be looked at before anything else
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants