-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
specific scenario causes infinite recursion in util.inspect (max stack size exceeded) #37054
Labels
Comments
This runs correctly in ❯ node test.js
<ref *1> B {
A: A { B: [Circular *1], [b]: [Getter: undefined] },
[a]: [Getter: undefined]
} |
Can confirm, just tested myself on 15.2 and it worked correctly. Issue happens on 15.3+ |
Probably introduced by #36052 |
I got a fix locally and I'll submit the PR later on.
|
jasnell
pushed a commit
that referenced
this issue
Apr 30, 2021
The documentation and layout example was not up to date with the latest changes. Signed-off-by: Ruben Bridgewater <[email protected]> PR-URL: #37079 Fixes: #37054 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
targos
pushed a commit
that referenced
this issue
May 3, 2021
A specially crafted object with circular structures behind getters could cause a infinite recursion. This is now fixed by detecting the objects as already visited. Signed-off-by: Ruben Bridgewater <[email protected]> PR-URL: #37079 Fixes: #37054 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
targos
pushed a commit
that referenced
this issue
May 3, 2021
The documentation and layout example was not up to date with the latest changes. Signed-off-by: Ruben Bridgewater <[email protected]> PR-URL: #37079 Fixes: #37054 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Happens when both
getters
andshowHidden
are enabled and the class contains circular references accessible by gettersWhat is the expected behavior?
The
depth
option should short circuit the circular references and display no more than 2 levels of depth.What do you see instead?
A giant wall of text.
Additional information
Also tested on node v15.4.0 and NWJS running node v15.3.0 but did not test in v14.
Issue discovered when attempting to inspect a
client
instance from thediscord.js
library, which makes use of such circular references.EDIT: just tested in v15.2.0 and it works correctly. It seems the issue was introduced with v15.3.0
The text was updated successfully, but these errors were encountered: