()
| 466 | } |
| 467 | |
| 468 | function checkStackCookie() { |
| 469 | if (ABORT) return; |
| 470 | var max = _emscripten_stack_get_end(); |
| 471 | // See writeStackCookie(). |
| 472 | if (max == 0) { |
| 473 | max += 4; |
| 474 | } |
| 475 | var cookie1 = HEAPU32[((max)>>2)]; |
| 476 | var cookie2 = HEAPU32[(((max)+(4))>>2)]; |
| 477 | if (cookie1 != 0x02135467 || cookie2 != 0x89BACDFE) { |
| 478 | abort('Stack overflow! Stack cookie has been overwritten at ' + ptrToString(max) + ', expected hex dwords 0x89BACDFE and 0x2135467, but received ' + ptrToString(cookie2) + ' ' + ptrToString(cookie1)); |
| 479 | } |
| 480 | // Also test the global address 0 for integrity. |
| 481 | if (HEAPU32[0] !== 0x63736d65 /* 'emsc' */) { |
| 482 | abort('Runtime error: The application has corrupted its heap memory area (address zero)!'); |
| 483 | } |
| 484 | } |
| 485 | |
| 486 | // end include: runtime_stack_check.js |
| 487 | // include: runtime_assertions.js |
no test coverage detected