Blazor: Running Module.malloc too early? #13915
Labels
area-blazor
Includes: Blazor, Razor Components
bug
This issue describes a behavior which is not expected - a bug.
feature-blazor-wasm
This issue is related to and / or impacts Blazor WebAssembly
Milestone
Describe the bug
Blazor appears to be potentially invoking emscripten/mono APIs before mono has actually loaded - there's some logic being executed in preRun that chains some callbacks that can call malloc, which will assert and fail. I'm seeing it in my local execution environment. It could have something to do with the fact that I'm testing a newer build of mono, but there aren't any changes that would cause this problem and it appears that blazor is doing something incorrect.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Something mostly functions
I think the correct behavior here is for the malloc call (and other calls out to emscripten/mono APIs) to be queued to occur after mono has actually started. I'm a little surprised that these callbacks could run this early but I suppose there's no reason they couldn't (unless this is a violation of some obscure promise ordering spec)
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: