Merge pull request #13443 from frangio/fix-13416

Clarify effect of memory unsafe assembly
This commit is contained in:
Leo 2022-08-29 17:25:23 +02:00 committed by GitHub
commit 94fd40f696
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -289,8 +289,8 @@ perform additional memory optimizations, if it can rely on certain assumptions a
While we recommend to always respect Solidity's memory model, inline assembly allows you to use memory
in an incompatible way. Therefore, moving stack variables to memory and additional memory optimizations are,
by default, disabled in the presence of any inline assembly block that contains a memory operation or assigns
to Solidity variables in memory.
by default, globally disabled in the presence of any inline assembly block that contains a memory operation
or assigns to Solidity variables in memory.
However, you can specifically annotate an assembly block to indicate that it in fact respects Solidity's memory
model as follows: