-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
async_hooks: fix resource stack for deep stacks
460c81d introduced a bug where the execution resource was not stored properly if we needed to call into C++ to extend the stack size. Fix that bug by always storing the resource. Refs: #34319 Fixes: #34556 PR-URL: #34573 Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Gus Caplan <me@gus.host>
- Loading branch information
1 parent
9ed424f
commit 5aed83c
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
const { AsyncLocalStorage } = require('async_hooks'); | ||
|
||
// Regression test for: https://github.com/nodejs/node/issues/34556 | ||
|
||
const als = new AsyncLocalStorage(); | ||
|
||
const done = common.mustCall(); | ||
|
||
function run(count) { | ||
if (count !== 0) return als.run({}, run, --count); | ||
done(); | ||
} | ||
run(1000); |