chromatic wrote:
t/op/calling_61.pir crashes because Parrot's trying to treat the number -1 as a PMC. Why?

The desired MMD sub should take two PMCs and returns an INTVAL (frame #5, signature "PP->I"), but the invoked MMD sub takes two PMCs and returns a PMC. The crash comes in convert_arg, where the C function has returned INTVAL -1, but the argument passing code expects that it has returned and Integer PMC. Because 0xffffffff isn't a valid PMC pointer, there's a crash.

If you look at src/pmc/integer.pmc, the cmp MULTIs there return INTVALs (signature IJPP), but the MULTI registration code declares them as signature PJPP. I modified Parrot::Pmc2c::MULTI to improve the return-value-of-cmp regexp and the test passes.

Excellent! Go ahead and apply. This will also fix the PGE build problem, which is the same segfault caused by the wrong signature on the NCI sub.

Allison

Reply via email to