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

Frequent console.log() calls prevent error output on stack overflow #25930

Open
vsemozhetbyt opened this issue Feb 4, 2019 · 3 comments
Open
Labels
stdio Issues and PRs related to stdio. tty Issues and PRs related to the tty subsystem. windows Issues and PRs related to the Windows platform.

Comments

@vsemozhetbyt
Copy link
Contributor

This seems familiar, but I cannot recall if this was considered wontfix.

See report on SO: https://stackoverflow.com/questions/54508290/maximum-calls-does-not-exceed-on-certain-code-inside-function-in-nodejs

This is not reproducible in Node.js 6 and 8, but is reproducible in Node.js 10 and 11, at least in Windows 7 x64.

@devsnek
Copy link
Member

devsnek commented Feb 4, 2019

both blow the stack at the same point (the 984kb limit) on macos for me

@vsemozhetbyt
Copy link
Contributor Author

vsemozhetbyt commented Feb 4, 2019

The first script on my machine with Node.js 8 vs Node js 10 (on cmd.exe shell):

>node.08.15.0.v8-6.2.exe test.js
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
11000
test.js:3
const loop = (i, maxI) => {
             ^

RangeError: Maximum call stack size exceeded
    at loop (test.js:3:14)
    at loop (test.js:12:12)
    at loop (test.js:12:12)
    at loop (test.js:12:12)
    at loop (test.js:12:12)
    at loop (test.js:12:12)
    at loop (test.js:12:12)
    at loop (test.js:12:12)
    at loop (test.js:12:12)
    at loop (test.js:12:12)

>node.10.15.1.v8-6.8.exe test.js
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000

>

@Fishrock123
Copy link
Contributor

If this issue is about stdio interleaving on Windows TTYs, there is no solution.

You'd need to "ask" Microsoft to add a "blocking" write ability to TTYs on Windows, at least to my knowledge.

@jasnell jasnell added stdio Issues and PRs related to stdio. tty Issues and PRs related to the tty subsystem. windows Issues and PRs related to the Windows platform. labels Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdio Issues and PRs related to stdio. tty Issues and PRs related to the tty subsystem. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

4 participants