Node repl crashes when trying to call back a large multiline item
Abierto
Nadie ha tomado este issue todavía.
confirmed-bug
readline
repl
- Lenguaje dominante
- JavaScript
- Estrellas
- 122k
- Forks
- 37.4k
- Merge medio
- 4 d 3 h
- PR fusionados (30 d)
- 272
Descripción
Version
24.4.1
Platform
Linux panta-rog 6.14.0-27-generic #27-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 17:01:58 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
Paste a huge multi-line JSON into repl.
Then bring it back via arrow up.
Then press arrow up again.
How often does it reproduce? Is there a required condition?
I can reproduce it with a long JSON.
What is the expected behavior? Why is that the expected behavior?
No crash.
What do you see instead?
TypeError: Cannot read properties of undefined (reading 'length')
at REPLServer.[_multilineMove] (node:internal/readline/interface:1092:36)
at REPLServer.[_moveUpOrHistoryPrev] (node:internal/readline/interface:1149:27)
at REPLServer.[_ttyWrite] [as _ttyWrite] (node:internal/readline/interface:1498:37)
at REPLServer.self._ttyWrite (node:repl:1035:9)
at ReadStream.onkeypress (node:internal/readline/interface:284:20)
at ReadStream.emit (node:events:507:28)
at ReadStream.emit (node:domain:489:12)
at emitKeys (node:internal/readline/utils:371:14)
at emitKeys.next (<anonymous>)
at ReadStream.onData (node:internal/readline/emitKeypressEvents:64:36)
Additional information
No response
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza reproduciendo el fallo en la Node REPL con un elemento JSON multilínea grande; después inspecciona internal/readline/interface en _multilineMove y _moveUpOrHistoryPrev, junto con node:repl. Se considera terminado cuando repetir las dos acciones de flecha arriba no provoca el TypeError indicado ni bloquea la REPL.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, linux, node.js
- Área
- cli
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 55/100