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

Tag All Assembly Blocks as Memory-Safe #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nlordell
Copy link
Contributor

This PR just tags all assembly blocks as memory-safe. Non-memory-safe assembly causes the Solidity compiler to disallow some Yul optimizations for the entire compilation unit.

I checked when marking the assembly blocks and I believe that they are all memory-safe (just not tagged as such).

For reference, assembly is considered memory-safe if (reference:

  • Memory allocated by yourself using a mechanism like the allocate function described above.
  • Memory allocated by Solidity, e.g. memory within the bounds of a memory array you reference.
  • The scratch space between memory offset 0 and 64 mentioned above.
  • Temporary memory that is located after the value of the free memory pointer at the beginning of the assembly block, i.e. memory that is “allocated” at the free memory pointer without updating the free memory pointer.

@nlordell
Copy link
Contributor Author

Weird... looks like the test timed out (but I'm unsure why).

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.

1 participant