You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
repl: fix .load infinite loop caused by shared use of lineEnding RegExp
Since the lineEnding Regular Expression is declared on the module scope,
recursive invocations of its `[kTtyWrite]` method share one instance of
this Regular Expression.
Since the state of a RegExp is managed by instance,
alternately calling RegExpPrototypeExec with the same RegExp on
different strings can lead to the state changing unexpectedly.
This is the root cause of this infinite loop bug when calling .load on
javascript files of certain shapes.
PR-URL: #46742Fixes: #46731
Reviewed-By: Kohei Ueno <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
0 commit comments