On Thu, Feb 02, 2006 at 01:32:49PM -0800, jerry gay wrote: > > This may or may not be related, but I'm getting a segfault for > > building PGE itself (x86_64/linux), when trying to run mklib.pir > > to generate the built-in rules. > > > i'm getting this, too, on win32. as are others, i think, on many platforms. > > > This is one of the first times I've tried any of this under > > 64-bit linux, so it might be totally unrelated. At any rate, > > > cd compilers/pge && ../../parrot -t mklib.pir >PGE/Library.pir > > near the end of it's output, reports: > > 3229 callmethodcc P0, "genfixedstr" - > P0=Object(PGE::Exp::Literal)=PMC(0x417 > 020), > 1973 get_params PMC_C[266] (7), P2, P0, S3, S2, S5, S4, S0 - , > P2=PMCNULL, > P0=PMCNULL, , , , , > 1982 set_args PMC_C[24] (1), P2 - , > P2=Object(PGE::Exp::Literal)=PMC(0x4 > 17020) > 1985 get_results PMC_C[236] (5), I3, I0, I4, I1, S-1 - , I3=0, > I0=2, > I4=1, I1=0, S-1="(null)" > 1992 callmethodcc P2, "quant" - > P2=Object(PGE::Exp::Literal)=PMC(0x417 > 020), > 1898 get_params PMC_C[24] (1), P0 - , P0=PMCNULL > [snip] > > what the heck is register "S-1" in the get_results op?? > when parrot got infinite registers, i don't think that meant they > could be negative, too :)
*Very* interesting -- I got the same problem. The call that generates the above is (min, max, islazy, iscut, $S0) = self."quant"() where the $S0 is a dummy register that isn't used anywhere else in the subroutine. If I convert this to a real register, as in (min, max, islazy, iscut, S8) = self."quant"() then the segfault goes away. (Through judicious print statements I was also able to narrow the problem down to this specific call.) I see the "-1" registers appear elsewhere in the output, for example, the following call has $I2 and $I3 which aren't used in the rest of the subroutine: ($I0, $I1, $I2, $I3, $S0) = self."quant"() It produces: 3165 set_args PMC_C[24] (1), P0 - , P0=Object(PGE::Exp::Literal)=PMC(0x906d10) 3168 get_results PMC_C[236] (5), I1, I0, I-1, I-1, S0 - , I1=0, I0=0, I-1=17, I-1=17, 3175 callmethodcc P0, "quant" - P0=Object(PGE::Exp::Literal)=PMC(0x906d10), If I need to be doing something else for parameter placeholders, let me know. I haven't tried the absolute register version (that doesn't segfault for me) on Allison's code yet, I'll work on that next. Pm