[perl #56448] [BUG] tailcalls cause segfault when invoked from C

Christoph Otto via RT parrotbug-followup at parrotcode.org
Sat Apr 18 20:38:59 UTC 2009


On Sun Jul 06 22:04:15 2008, songmaster wrote:
> Ok, I'm done with trying to understand and debug this any further.  It
> needs someone who knows how the Parrot interpreter stores return
> arguments and how the tail-call stuff is implemented as well.
> 
> At least I found that the segfault was only a side-effect of this
> problem, see RT #56636.  Once that fix is applied the segfault will no
> longer occur, but the tail-call code output will not be correctly sorted
> since the underlying problem still exists.

The attached pir code (updated from the original post) no longer
segfaults at r38198, but it does produce an incorrectly ordered array:

$ ./parrot broken_tailcall_sort.pir 
4 5 3 2 5 1
1 2 3 4 5 5
2 4 5 3 1 5

This should be looked into and fixed once the pcc_rewiring branch has
been merged back into trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: broken_tailcall_sort.pir
Type: application/octet-stream
Size: 923 bytes
Desc: not available
URL: <http://lists.parrot.org/pipermail/parrot-dev/attachments/20090418/2947c180/attachment.obj>


More information about the parrot-dev mailing list