You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 17, 2022. It is now read-only.
If this contract is deployed the same modification to the memory happens before ret is called (call 0). However the memory at 0..3 is part of the contract code that is returned and was initialized correctly with the data section to \00asm. After func 2 is called Parity Ethereum will read the memory at 0..51 and store this as the contract data. With the memory modification this now starts with \ff\ff\ff\ff and is not valid Wasm.
The contract created by a pwasm module might be invalid if the
deploycode modifies memory.For example consider the following Wasm module.
Here the
$deployfunction modifies the memory at location0..3by setting all bytes to0xff.With
wasm-buildthis code is transformed toIf this contract is deployed the same modification to the memory happens before
retis called (call 0). However the memory at0..3is part of the contract code that is returned and was initialized correctly with thedatasection to\00asm. Afterfunc 2is called Parity Ethereum will read the memory at0..51and store this as the contract data. With the memory modification this now starts with\ff\ff\ff\ffand is not valid Wasm.