> [leo - Tue Nov 08 02:17:18 2005]: > > Will Coleda (via RT) wrote: > > > Trying to patch punie, I get to a point with the following: > > > > wcoleda$ cat foo.pir > > .sub main :main > > $P1 = compreg "PAST" > > $P2 = $P1("Parrot_AST(Py_Module(Stmts(Py_Print(Const(1)))))") > > $P2() > > .end > > wcoleda$ ../../parrot foo.pir > > src/packfile.c:2314: failed assertion `ct->constants!=NULL' > > Fixed. Is there any reason that realloc(NULL, the_size) is doubtful? Dan > has invalidated mem_sys_realloc() that takes a NULL ptr. > > leo
The assertion error is gone, but I now get a segfault running this code. Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x6bd11384 0x00041a5c in runops (interpreter=0xd000f0, offs=0) at src/inter_run.c:90 90 CONTEXT(interpreter->ctx)->runloop_level--; (gdb) bt #0 0x00041a5c in runops (interpreter=0xd000f0, offs=0) at src/inter_run.c:90 #1 0x00041d24 in runops_args (interpreter=0xd000f0, sub=0xcf1218, obj=0x201b1d0, meth=0x0, sig=0x243368 "vP", ap=0xbffff7e4 "") at src/inter_run.c:180 #2 0x00041ea8 in Parrot_runops_fromc_args (interpreter=0xd000f0, sub=0xcf1218, sig=0x243368 "vP") at src/inter_run.c:274 #3 0x000178a8 in Parrot_runcode (interpreter=0xd000f0, argc=1, argv=0xbffff9b0) at src/ embed.c:818 #4 0x00017618 in Parrot_runcode (interpreter=0xd000f0, argc=1, argv=0xbffff9b0) at src/ embed.c:749 #5 0x000042bc in main (argc=1, argv=0xbffff9b0) at imcc/main.c:642