Skip to content
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

assert: RangeError: Maximum call stack size exceeded is still present #13314

Closed
rmdm opened this issue May 30, 2017 · 2 comments
Closed

assert: RangeError: Maximum call stack size exceeded is still present #13314

rmdm opened this issue May 30, 2017 · 2 comments
Labels
assert Issues and PRs related to the assert subsystem. confirmed-bug Issues with confirmed bugs.

Comments

@rmdm
Copy link
Contributor

rmdm commented May 30, 2017

  • Version: tested on v6.9.1 and v8.0.0-pre, but it seems like all versions are affected.
  • Platform: Linux 3.16.0-4-amd64 SMP Debian 3.16.39-1 (2016-12-30) x86_64 GNU/Linux
  • Subsystem: assert

The following code

const a = {}
a.ref = a

const b = {}
b.ref = b

const c = { ref: b }

assert.deepEqual(a, c)

ends up with RangeError: Maximum call stack size exceeded and it seems like changes for #6416 didn't fixed that error entirely.

I'm going to provide the fix in a PR soon.

@Fishrock123 Fishrock123 added confirmed-bug Issues with confirmed bugs. assert Issues and PRs related to the assert subsystem. labels May 30, 2017
rmdm added a commit to rmdm/node that referenced this issue Jun 1, 2017
This commit changes semantics of the memos cycles tracker. Before
the change it was used to track all currently wisited nodes of an
object tree, which is a bit shifted from its original intention of
tracking cycles. The change brings intended semantics, by tracking
only objects of the current branch of the object tree.

Fixes: nodejs#13314
@jasnell jasnell closed this as completed in b1ed55f Jun 2, 2017
jasnell pushed a commit that referenced this issue Jun 5, 2017
Fixes: #13314
Refs: #6416

This commit changes semantics of the memos cycles tracker. Before
the change it was used to track all currently wisited nodes of an
object tree, which is a bit shifted from its original intention of
tracking cycles. The change brings intended semantics, by tracking
only objects of the current branch of the object tree.

PR-URL: #13318
Fixes: #13314
Ref: #6416
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@wuliupo
Copy link

wuliupo commented Jun 7, 2017

var a = [];
a[0] = a;
JSON.stringify(a);
// Uncaught TypeError: Converting circular structure to JSON

@BridgeAR
Copy link
Member

BridgeAR commented Jun 7, 2017

@wuliupo you can't stringify a circular structure. That's by spec and it is completely independent from the issue about the range error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assert Issues and PRs related to the assert subsystem. confirmed-bug Issues with confirmed bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants