JSON.parse failure on deeply nested input corrupts the string; later split() returns non-array, then FATAL 'Not a native context' (v26)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, node.js
Línea de trabajo
Start by reproducing the supplied snippet on Node.js v26 and compare its output with v20, v22, and v24; the report points to the V8 JSON parser’s deep-nesting error path and subsequent string split. Trace the parser behavior and the relevant V8 or Node.js regression tests, then add a regression test showing that a caught parse error leaves the input usable by split() and does not abort on exit.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Version
v26.13.0 (official node:26-slim image, V8 14.6.202.34-node.40); also v26.8.1 (Arch Linux package). Not reproducible on v20.20.2, v22.23.4, v24.22.2.
Platform
Linux x86_64
Subsystem
v8
What steps will reproduce the bug?
const t = '[1,\n'.repeat(10000) + '1]'; // nested ~10,000 arrays deep, unclosed
try { JSON.parse(t); } catch {} // throws (expected)
const s = t.split('\n');
console.log(Array.isArray(s), s.length); // expected: true 10001
Same result with --no-maglev --no-turbofan.
How often does it reproduce? Is there a required condition?
Every time with the snippet above: a failing JSON.parse on a string nested several thousand levels deep, then split on the same string.
What is the expected behavior? Why is that the expected behavior?
true 10001, as on Node 20, 22 and 24. A caught parse error must not affect later operations on the input string.
What do you see instead?
false 3, then the process aborts on exit:
FATAL ERROR: Context::GetNumberOfEmbedderDataFields Not a native context
4: v8::Context::GetNumberOfEmbedderDataFields()
5: node::Environment::GetCurrent(v8::Isolate*)
6: node::async_context_frame::set(...)
...
Aborted (core dumped)
In a larger app the same shape aborted with Check failed: IsName() or a SIGSEGV.
Additional information
Found when a service parsed a ~380 KB model output beginning with [. Our workaround is to check nesting depth before calling JSON.parse. Looks like the JSON parser's stack-overflow path leaves the string (or heap) in a bad state; it may belong upstream in V8.
- Lenguaje dominante
- JavaScript
- Estrellas
- 124k
- Forks
- 38k
- Merge medio
- 4 d 2 h
- PR fusionados (30 d)
- 266
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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.
Más de nodejs/node
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
Los mantenedores suelen responder en 1 día
-
fs: document readStream.start and readStream.endPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertodoc
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
nodejs/node#67848 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
doc: document the Buffer.prototype.*Slice() methodsPosiblemente ocupada @AyushCipher la tomó hoy. Abiertodoc
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
nodejs/node#67847 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
`styleText` fast path bypasses `options` and `options.validateStream` validationPosiblemente ocupada @GBra-4-669 la tomó hace 8 días. Abiertoutil
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
riscv64
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
nodejs/node#67655 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de nodejs/node
Issues similares
-
bug triage needed
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
[Resource]: PersephoneAbiertoresource-submission validation-passed
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
hesreallyhim/awesome-claude-code#3773 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
tabatkins/railroad-diagrams#129 ·
-
web: api() turns a null or object-valued error body into a TypeError or "[object Object]" and loses the statusPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
OCM: shares using the `embedded` protocol are rejected with "Missing sharedSecret in protocol"Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día