My favorites | Sign in
Project Home Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 3: Segfault when calling context.init_standard_classes() on 2 different objects with the same context
1 person starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  var...@gmail.com


 
Project Member Reported by var...@gmail.com, Sep 8, 2009
The following test reproduces the error:

    def testInitStandardClassesWorksTwice(self):
        cx = pydermonkey.Runtime().new_context()
        obj = cx.new_object()
        cx.init_standard_classes(obj)
        obj2 = cx.new_object()
        cx.init_standard_classes(obj2)

This results in the following error, followed by a segfault:

Assertion failure: !OBJ_GET_PARENT(cx, obj), at
spidermonkey-1.8.1pre/js/src/jsobj.cpp:3237

Sep 8, 2009
Project Member #1 var...@gmail.com
I added a workaround for this in revision 98f81f879a31.

Note that I also tried fixing this by a few other means, but all of them made
testSyntaxErrorsAreRaised fail (the Error object couldn't be converted to a string).
 Not sure what's going on here.

Oct 1, 2009
#2 jribb...@gmail.com
I expect you need to do JS_SetParent(cx, obj, NULL) after doing JS_NewObject if
you're going to be doing JS_InitStandardClasses on it.

Powered by Google Project Hosting