Skip to content

Commit

Permalink
fixed memory bug in storage maps
Browse files Browse the repository at this point in the history
  • Loading branch information
g-r-a-n-t committed Mar 4, 2022
1 parent a86a9fb commit 16ea2a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/yulgen/src/runtime/functions/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ pub fn alloc_mstoren() -> yul::Statement {
pub fn map_value_ptr() -> yul::Statement {
function_definition! {
function map_value_ptr(a, b) -> return_val {
(let ptr := avail())
(let ptr := alloc(64))
(mstore(ptr, a))
(mstore((add(ptr, 32)), b))
(let hash := keccak256(ptr, 64))
Expand Down
1 change: 1 addition & 0 deletions newsfragments/684.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The region of memory used to compute the slot of a storage map value was not being allocated.

0 comments on commit 16ea2a9

Please sign in to comment.