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

allow addMemory to support 65536 wasm pages memory #2654

Merged
merged 4 commits into from Apr 25, 2023

Conversation

HerrCai0907
Copy link
Member

@HerrCai0907 HerrCai0907 commented Feb 16, 2023

If wasm uses 65536 pages memory, memory.size() << 16 will be 0 due to overflow.
It causes assert(start <= end) failed. (end is 0)
Actually due to assemblyscript runtime will double the memory each time. It will happened when wasm uses 32768 page and want to grow memory.

This PR wants to avoid this assert failed when wasm use 65536 pages.

fixed: #2653

@HerrCai0907
Copy link
Member Author

@dcodeIO @MaxGraey Could you kindly review it?

std/assembly/rt/tlsf.ts Outdated Show resolved Hide resolved
@dcodeIO dcodeIO merged commit e28f536 into AssemblyScript:main Apr 25, 2023
12 checks passed
@HerrCai0907 HerrCai0907 deleted the rt-addMemory branch April 28, 2023 21:01
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.

addMemory in rt cannot handle more 65536 wasm page memory.
2 participants