On Fri Dec 05 02:05:07 2008, [EMAIL PROTECTED] wrote:
> This is a bit of a fragile one as it moves around depending on what NCI
> functions I have compiled. This segfaults for me:
> 
> class foo { has $x; method y() { { $x } } }
> 
> Previously it segfaulted like this:
> 
> class Foo { has $x; method y($bar) { given (1) { baz($x, $bar) } } }
> 
Was a fairly easy bug to track down and fix inside Rakudo, which I've
done in r33527.

I also went hunting for the reason it segfaulted, because Parrot
shouldn't do that. Looking in the debugger showed we were looking at
garbage data, but didn't help me see why. Then I found that if I got the
compiler to just spit out PIR, then tried to compile that PIR, it turned
out it was invalid. A trace later, I realized that even if the PIR
compiler bailed out at some point, it still tried to run the :init subs
in the not-finished-compiling-yet bytecode. We now (r33526) check if
there compile actually succeeded before trying to run the resulting
code... ;-)

Thanks!

Jonathan

Reply via email to