Subj : Re: JS_InitClass segfaults in my JS/Python bridge To : "John J. Lee" From : Brendan Eich Date : Fri Aug 01 2003 09:36 am John J. Lee wrote: > jjl@pobox.com (John J. Lee) writes: > Not sure this is much help, but here's a traceback (not sure what that > ?? is, either): > > (gdb) bt > #0 0x081f7598 in ?? () > #1 0x4040da5a in JS_InitClass (cx=0x81d6248, obj=0x81f6b40, parent_proto=0x81f6b40, clasp=0x8202500, > constructor=0x403dc0f8 <__pyx_f_12spidermonkey_constructor_stub>, nargs=0, ps=0x0, fs=0x0, static_ps=0x0, static_fs=0x0) at jsapi.c:1828 Stacks are good, but in this case some more info is needed: what is *clasp? Can you run under gdb and stop on line 1828 in jsapi.c? If so, can you step over the js_NewObject call there without crashing? If not, step into that call and see if you can find out why it apparently trashes the stack (somewhat), leading to the ??. Or, maybe it never is called for some reason. How did you build RC5? How do you allocate the JSClass you pass into JS_InitClass by its address as the clasp param? Again, seeing *clasp in full might help. /be .