GNOME Bugzilla – Bug 696933
Crashes running test program
Last modified: 2013-04-02 16:33:27 UTC
Created attachment 240180 [details] test.js js-1.8.5-13.fc19.x86_64 gjs-1.36.0-1.fc19.x86_64 Running the attached test program, gjs crashes with the following bt.
+ Trace 231700
Created attachment 240181 [details] test.js Smaller reproducer
The issue is that Gdkpixbuf.GdkPixbuf is undefined (use Gdkpixbuf.Pixbuf instead), but we definitely shouldn't blow up here.
Created attachment 240401 [details] [review] Fix crash when marshalling a GType array containing non objects It would cast a jsval of the wrong type to object and pass NULL to gjs_gtype_get_actual_gtype() Tests included.
Review of attachment 240401 [details] [review]: ::: gi/arg.c @@ +629,3 @@ + if (!JSVAL_IS_OBJECT(elem) || + (gtype = gjs_gtype_get_actual_gtype(context, JSVAL_TO_OBJECT(elem))) I don't quite like the style here. I'd prefer: if (!JSVAL_IS_OBJECT(elem)) goto err; gtype = gjs_gtype_get_actual_gtype(context, JSVAL_TO_OBJECT(elem)); if (gtype == G_TYPE_INVALID) goto err;
Created attachment 240406 [details] [review] Fix crash when marshalling a GType array containing non objects It would cast a jsval of the wrong type to object and pass NULL to gjs_gtype_get_actual_gtype() Tests included.
Review of attachment 240406 [details] [review]: OK.
Attachment 240406 [details] pushed as f4a5b2c - Fix crash when marshalling a GType array containing non objects