Closed
Description
I reproduced it in a fork of json parser
example:
https://github.com/fluencelabs/assemblyscript-json
to check bug run npm run test
Memory is initialized in helpers.ts
as new WebAssembly.Memory({ initial: 2, maximum: 1000 }
.
In roundtrip.spec.as.ts
JSON is serialized-deserialized 500 times.
This parser is leaking, so the memory size grows with each iteration and the program will throw an exception:
Error {
message: 'Abort called at ~lib/allocator/tlsf.ts [483:2]',
}
There will be no exceptions if increase initial memory pages or change allocator to buddy
or arena
.