Skip to content

Allocate one byte per memory byte array element instead of 32.#3067

Merged
chriseth merged 1 commit intodevelopfrom
correct_byte_array_allocation
Oct 17, 2017
Merged

Allocate one byte per memory byte array element instead of 32.#3067
chriseth merged 1 commit intodevelopfrom
correct_byte_array_allocation

Conversation

@chriseth
Copy link
Contributor

Fixes #3064

@chriseth chriseth assigned chriseth and unassigned chriseth Oct 11, 2017
@chriseth chriseth requested a review from axic October 11, 2017 10:32
@chriseth chriseth force-pushed the correct_byte_array_allocation branch from 243a37a to dadcb48 Compare October 13, 2017 15:00
@chriseth
Copy link
Contributor Author

@axic please review, this is short and important.

}
)";
compileAndRun(sourceCode);
ABI_CHECK(callContractFunction("f()"), encodeArgs(0x40, 0x40, 0x20 + 256));
Copy link
Contributor

@axic axic Oct 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for readability perhaps go with 32 + 32, 32 + 32, 32 + 256 or 0x20 + 32 or 0x20 + 0xff.

@chriseth chriseth force-pushed the correct_byte_array_allocation branch from 4a6bea0 to 21cc144 Compare October 16, 2017 20:28
@chriseth chriseth force-pushed the correct_byte_array_allocation branch from 21cc144 to 6001bd1 Compare October 16, 2017 20:29
@chriseth chriseth merged commit 8fbfd62 into develop Oct 17, 2017
@axic axic deleted the correct_byte_array_allocation branch October 17, 2017 08:15
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.

2 participants