MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / check_stack

Function check_stack

test/core/test_promise.c:547–562  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547static em_promise_result_t check_stack(void** result, void* data, void* value) {
548 // Make sure the stack pointer is the same every time this is called.
549 static uintptr_t expected_stack = 0;
550 uintptr_t curr_stack = emscripten_stack_get_current();
551 if (!expected_stack) {
552 expected_stack = curr_stack;
553 return EM_PROMISE_FULFILL;
554 }
555 if (curr_stack != expected_stack) {
556 emscripten_console_logf("stack pointer at %p, expected %p",
557 (void*)curr_stack,
558 (void*)expected_stack);
559 return EM_PROMISE_REJECT;
560 }
561 return EM_PROMISE_FULFILL;
562}
563
564int main() {
565 em_promise_t start = emscripten_promise_create();

Callers

nothing calls this directly

Calls 1

emscripten_console_logfFunction · 0.85

Tested by

no test coverage detected