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

Method test_safe_stack

test/test_core.py:9100–9112  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

9098 self.do_run_in_out_file_test('hello_world.c', cflags=['-fsanitize=address', '--extern-post-js=post.js'])
9099
9100 def test_safe_stack(self):
9101 self.set_setting('STACK_OVERFLOW_CHECK', 2)
9102 self.set_setting('STACK_SIZE', 1024)
9103 if self.is_optimizing():
9104 expected = [r'stack overflow \(Attempt to set SP to 0x[0-9a-fA-F]+, with stack limits \[0x[0-9a-fA-F]+ - 0x[0-9a-fA-F]+\]\)']
9105 else:
9106 expected = [r'stack overflow \(Attempt to set SP to 0x[0-9a-fA-F]+, with stack limits \[0x[0-9a-fA-F]+ - 0x[0-9a-fA-F]+\]\)',
9107 '__handle_stack_overflow']
9108 self.do_runf('core/test_safe_stack.c',
9109 expected_output=expected,
9110 regex=True,
9111 assert_all=True,
9112 assert_returncode=NON_ZERO)
9113
9114 @requires_pthreads
9115 @no_bun('https://github.com/emscripten-core/emscripten/issues/26199')

Callers

nothing calls this directly

Calls 3

is_optimizingMethod · 0.95
set_settingMethod · 0.80
do_runfMethod · 0.80

Tested by

no test coverage detected