RyanLamansky / dotnet-webassembly

Create, read, modify, write and execute WebAssembly (WASM) files from .NET-based applications.
Apache License 2.0
791 stars 74 forks source link

Fixes #18 Not zero initializing new memory, causing grow memory test failures #19

Closed Tyler-IN closed 4 years ago

Tyler-IN commented 4 years ago

Removes emptyPage member.

Adds CopyBlock, InitBlock functions.

Note: CopyBlock is not used.

Replaces zeroing Marshal.Copy with call to InitBlock.

Zeroes newly memory on alloc and realloc.

Tyler-IN commented 4 years ago

Oh I expected there to be a CI to run the tests...

Errors on memory grow spec lines 89, 91 are fixed.

Memory grow spec lines 19 to 97 are no longer skipped.

RyanLamansky commented 4 years ago

Memory grow spec lines 19 to 97 are no longer skipped.

I assume that means they're all passing? If not, the failing ones should still be skipped until the problem is fixed.

Tyler-IN commented 4 years ago

Yeah they (were) passing (with the if Start is default then Alloc path, since removed not passing).

Tyler-IN commented 4 years ago

If you want any additional whitespace / code-styling changes other than those outlined in the review, add appropriate config files to the repo please. I generally have a different K&R code style altogether that I have disabled to work on this fork.