MCPcopy
hub / github.com/opentrace/opentrace / checkStackCookie

Function checkStackCookie

ui/public/lbug_wasm_worker.js:1689–1707  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1687 HEAPU32[(0 >>> 2) >>> 0] = 1668509029;
1688 }
1689 function checkStackCookie() {
1690 if (ABORT) return;
1691 var max = _emscripten_stack_get_end();
1692 if (max == 0) {
1693 max += 4;
1694 }
1695 var cookie1 = HEAPU32[(max >>> 2) >>> 0];
1696 var cookie2 = HEAPU32[((max + 4) >>> 2) >>> 0];
1697 if (cookie1 != 34821223 || cookie2 != 2310721022) {
1698 abort(
1699 `Stack overflow! Stack cookie has been overwritten at ${ptrToString(max)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ptrToString(cookie2)} ${ptrToString(cookie1)}`,
1700 );
1701 }
1702 if (HEAPU32[(0 >>> 2) >>> 0] != 1668509029) {
1703 abort(
1704 'Runtime error: The application has corrupted its heap memory area (address zero)!',
1705 );
1706 }
1707 }
1708 class EmscriptenEH extends Error {}
1709 class EmscriptenSjLj extends EmscriptenEH {}
1710 class CppException extends EmscriptenEH {

Callers 5

initRuntimeFunction · 0.85
preMainFunction · 0.85
postRunFunction · 0.85
handleExceptionFunction · 0.85
runFunction · 0.85

Calls 2

abortFunction · 0.85
ptrToStringFunction · 0.85

Tested by

no test coverage detected