fix: init heap before random number seed on wasm platforms

This changes the order for initialization of the random number
seed generation on wasm platforms until after the heap has been
initialized. Should fix #5198

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2026-02-15 19:24:16 +01:00
committed by Ron Evans
parent 4b0e858964
commit 934d5f41bf
+1 -1
View File
@@ -34,8 +34,8 @@ func wasmEntryReactor() {
// Initialize the heap.
heapStart = uintptr(unsafe.Pointer(&heapStartSymbol))
heapEnd = uintptr(wasm_memory_size(0) * wasmPageSize)
initRand()
initHeap()
initRand()
if hasScheduler {
// A package initializer might do funky stuff like start a goroutine and