Skip to content

Commit

Permalink
Fix ASYNCIFY_DEBUG=1
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 committed Jan 8, 2025
1 parent 9096999 commit a27790d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/library_async.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ addToLibrary({
#endif
ret[x] = (...args) => {
#if ASYNCIFY_DEBUG >= 2
dbg(`ASYNCIFY: ${' '.repeat(Asyncify.exportCallStack.length} try ${x}`);
dbg(`ASYNCIFY: ${' '.repeat(Asyncify.exportCallStack.length)} try ${x}`);
#endif
#if ASYNCIFY == 1
Asyncify.exportCallStack.push(x);
Expand Down Expand Up @@ -254,7 +254,7 @@ addToLibrary({
setDataRewindFunc(ptr) {
var bottomOfCallStack = Asyncify.exportCallStack[0];
#if ASYNCIFY_DEBUG >= 2
dbg('ASYNCIFY: setDataRewindFunc('+ptr+'), bottomOfCallStack is', bottomOfCallStack, new Error().stack);
dbg(`ASYNCIFY: setDataRewindFunc(${ptr}), bottomOfCallStack is`, bottomOfCallStack, new Error().stack);
#endif
var rewindId = Asyncify.getCallStackId(bottomOfCallStack);
{{{ makeSetValue('ptr', C_STRUCTS.asyncify_data_s.rewind_id, 'rewindId', 'i32') }}};
Expand Down
2 changes: 1 addition & 1 deletion test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -10776,7 +10776,7 @@ def test_asyncify_advise(self):
self.assertContained('[asyncify] i can', out)

def test_asyncify_stack_overflow(self):
self.emcc_args = ['-sASYNCIFY', '-sASYNCIFY_STACK_SIZE=4']
self.emcc_args = ['-sASYNCIFY', '-sASYNCIFY_STACK_SIZE=4', '-sASYNCIFY_DEBUG=2']

# The unreachable error on small stack sizes is not super-helpful. Try at
# least to hint at increasing the stack size.
Expand Down

0 comments on commit a27790d

Please sign in to comment.