Return value of JS_NewClass not checked in js_std_init/js_os_init
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 48/100
Línea de trabajo
Start in quickjs-libc.c at the JS_NewClass calls in js_std_init and js_os_init, then read the JS_NewClass and JS_NewClass1 declarations to compare their return signatures. Reproduce the low-memory failure if possible and verify that both initialization paths handle class-registration failure before JS_SetClassProto is reached.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hihi,
I am trying to debug crashes of quickjs in case of low memory settings. One of the problems I hit was
Assertion failed: (class_id < rt->class_count), function JS_SetClassProto, file quickjs.c, line 2208.
(which is here)
Turns out that this assertion is hit because the two JS_NewClass calls do not check the return value:
- https://github.com/bellard/quickjs/blob/6e2e68fd0896957f92eb6c242a2e048c1ef3cae0/quickjs-libc.c#L1568
- https://github.com/bellard/quickjs/blob/6e2e68fd0896957f92eb6c242a2e048c1ef3cae0/quickjs-libc.c#L3768
Do I understand this is a missing error check? Should I provide a PR to fix this? Is the error signature of JS_NewClass the same as JS_NewClass1?
Thanks!
- Lenguaje dominante
- C
- Estrellas
- 11.1k
- Forks
- 1.2k
- Merge medio
- 11 h 20 min
- PR fusionados (30 d)
- 1
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 bellard/quickjs
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 3 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
Los mantenedores suelen responder en 3 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
Los mantenedores suelen responder en 3 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 3 días
-
Collecting WeakMap keys requires multiple GC passesPosiblemente ocupada @jluxenberg la tomó hace 2 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
bellard/quickjs#581 · 1 comentario ·
Los mantenedores suelen responder en 3 días
Todos los issues de bellard/quickjs
Issues similares
-
GPU-UNLOCK RTX 4070 (2786) Gigabyte 1458:416C: cold boot AND warm reboot unlock, Ubuntu 26.04Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
JustAResearcher/gpu-unlock-ada#124 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
inflate: total_in uses plain += on c_ulong (32-bit on Windows), panics in debug for streams > 4 GiBAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
trifectatechfoundation/zlib-rs#570 · 1 comentario ·
-
vim.filetype.match() prefixes a URL buffer name with the cwd before passing it to filetype functionsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
compilation errorAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
COVESA/dlt-daemon#925 · 1 reacción ·