@sync
@no_wasm_backend('https://github.com/emscripten-core/emscripten/issues/9039')
def test_stack_overflow_check(self):
    args = (self.emcc_args + ['-s', 'TOTAL_STACK=1048576'])
    self.emcc_args = (args + ['-s', 'STACK_OVERFLOW_CHECK=2', '-s', 'ASSERTIONS=0'])
    self.do_run(open(path_from_root('tests', 'stack_overflow.cpp')).read(), 'Stack overflow! Attempted to allocate', assert_returncode=None)
    self.emcc_args = (args + ['-s', 'ASSERTIONS=1'])
    self.do_run(open(path_from_root('tests', 'stack_overflow.cpp')).read(), 'Stack overflow! Attempted to allocate', assert_returncode=None)
@sync
@no_wasm_backend('https://github.com/emscripten-core/emscripten/issues/9039')
def test_stack_overflow_check(self):
    args = (self.emcc_args + ['-s', 'TOTAL_STACK=1048576'])
    self.emcc_args = (args + ['-s', 'STACK_OVERFLOW_CHECK=2', '-s', 'ASSERTIONS=0'])
    self.do_run(open(path_from_root('tests', 'stack_overflow.cpp')).read(), 'Stack overflow! Attempted to allocate', assert_returncode=None)
    self.emcc_args = (args + ['-s', 'ASSERTIONS=1'])
    self.do_run(open(path_from_root('tests', 'stack_overflow.cpp')).read(), 'Stack overflow! Attempted to allocate', assert_returncode=None)