-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
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:
Line 1568 in 6e2e68f
JS_NewClass(JS_GetRuntime(ctx), js_std_file_class_id, &js_std_file_class); Line 3768 in 6e2e68f
JS_NewClass(JS_GetRuntime(ctx), js_worker_class_id, &js_worker_class);
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!
Metadata
Metadata
Assignees
Labels
No labels