-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Open
Labels
macosIssues and PRs related to the macOS platform / OSX.Issues and PRs related to the macOS platform / OSX.replIssues and PRs related to the REPL subsystem.Issues and PRs related to the REPL subsystem.
Description
Version
18.3.0
Platform
Darwin SoMuchBiggerOnTheInside-2.local 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64 x86_64
Subsystem
No response
What steps will reproduce the bug?
- Open iTerm2 version 3.4.15 and start a new node REPL session.
- Ignoring the comment on the first line, copy the first 3,500 characters of the jQuery v3.6.0 minified library (https://code.jquery.com/jquery-3.6.0.min.js) into the REPL. The REPL will freeze.
- Open a new tab, start a new node REPL, and paste ~2,000 characters of the library into the REPL. The code will be cut short. You can copy and paste new chunks of text into the REPL, as long as you keep your text less than ~2,000 - 3,500 characters in length. However if you paste more than that, the REPL will freeze.
- Use this formatter to format the jquery library (don't make any changes to the default settings for the formatter): https://webformatter.com/javascript
- Paste the first 128 lines into the REPL (including the first comment line). This is 3,906 characters. The REPL will display errors and only show part of the code you have pasted, but will not freeze.
- The 129th line is the beginning of a for statement. Copying all of the text up until the end of the keyword
for
(but before the(
) and pasting this into the REPL will cause it to freeze. If you only copy a part of the wordfor
it won't freeze.
How often does it reproduce? Is there a required condition?
I can replicate these symptoms every time. Note that I can paste the entire jQuery library into a Python REPL (in the same iTerm2 tab) without any freezing at all. The fact that the for
keyword changes behavior makes me think the error is happening when parsing the language. It may be a regression of #32999 (or a similar bug, for Macs), but pasting the 1000 "a" commands in the gist below (mentioned in #32999 comments) does not cause the REPL to freeze.
What is the expected behavior?
I expect the REPL to accept the pasted text.
What do you see instead?
The REPL freezes or only shows part of the pasted text.
Additional information
No response
dmitryp-orca
Metadata
Metadata
Assignees
Labels
macosIssues and PRs related to the macOS platform / OSX.Issues and PRs related to the macOS platform / OSX.replIssues and PRs related to the REPL subsystem.Issues and PRs related to the REPL subsystem.