Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #40608] key_append segfault

2 views
Skip to first unread message

Jonathan Worthington

unread,
Oct 28, 2006, 4:32:25 PM10/28/06
to bugs-bi...@rt.perl.org
# New Ticket Created by Jonathan Worthington
# Please include the string: [perl #40608]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40608 >


The following program segfaults Parrot:

.sub main
$P0 = new .Key
push $P0, "test"
push $P0, "test"
print "not reached"
.end

Which sucks. :-(

Bob Rogers

unread,
Oct 28, 2006, 6:30:12 PM10/28/06
to perl6-i...@perl.org, bugs-bi...@rt.perl.org
From: Jonathan Worthington (via RT) <parrotbug...@parrotcode.org>
Date: Sat, 28 Oct 2006 13:32:25 -0700

The following program segfaults Parrot:

.sub main
$P0 = new .Key
push $P0, "test"
push $P0, "test"
print "not reached"
.end

Which sucks. :-(

I don't see a segfault in r15040 on x86 GNU/Linux, but it seems to be
using push_string(). Same error on r15009. What are you running?

-- Bob

------------------------------------------------------------------------
rogers@rgrjr> cat jw.pir

.sub main :main


$P0 = new .Key
push $P0, "test"
push $P0, "test"
print "not reached"
.end

rogers@rgrjr> ./parrot jw.pir
push_string() not implemented in class 'Key'
current instr.: 'main' pc 3 (jw.pir:4)
rogers@rgrjr>

jnthn@jnthn.net via RT

unread,
Oct 28, 2006, 6:46:21 PM10/28/06
to perl6-i...@perl.org
On Sat Oct 28 15:30:49 2006, rgrjr wrote:
> I don't see a segfault in r15040 on x86 GNU/Linux, but it seems to be
> using push_string(). Same error on r15009. What are you running?
>
Windows. And sorry, I stuffed up the example. It shoulda been:

.sub main
$P0 = new .Key

$P1 = new .String
$P1 = "test"
push $P0, $P1
$P2 = new .String
$P2 = "test"
push $P0, $P2
print "not reached"
.end

That is, you can only push another key onto a key. I discovered this by
accident when implementing :vtable, and filed a ticket to make sure it
wasn't forgotten. Turns out it was easy to deal with, so as of r15043
the issue is resolved. Sorry for the noise on-list.

Jonathan

0 new messages