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

[perl #41310] [CAGE] autogenerated PMC stubs kill compile

0 views
Skip to first unread message

Allison Randal

unread,
Jan 22, 2007, 2:56:09 AM1/22/07
to bugs-bi...@rt.perl.org
# New Ticket Created by Allison Randal
# Please include the string: [perl #41310]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41310 >


When generating a stub PMC with F<tools/dev/gen_class.pl>, the generated
stub terminates the compile process the first time miniparrot is run.
This is because the freshly generated stub overrides the C<namespace>
method to return a null PMC.

Simply commenting out the overridden C<namespace> method resolves the
problem (because the default C<namespace> works correctly). But, the
first experience when creating a new PMC should not be hunting down
obscure compile errors. So, fix F<tools/dev/gen_class.pl> so it either
doesn't generate a stub method for C<namespace>, or so it generates the
method commented out.

------
The error during compile:
Invoking Parrot to generate runtime/parrot/include/config.fpmc --cross
your fingers
./miniparrot config_lib.pasm > runtime/parrot/include/config.fpmcmake:
*** [runtime/parrot/include/config.fpmc] Error 138

gdb reports:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x000000100x000b3214 in
find_method_direct_1 (interp=0x1900330, class=0x20345d0,
method_name=0x1a0b518) at src/objects.c:13571357 method =
VTABLE_get_pmc_keyed_str(interp, ns, method_name);

and:
(gdb) p ns
$1 = (PMC *) 0x0
------

Allison

Chromatic

unread,
Jun 4, 2007, 12:18:27 AM6/4/07
to perl6-i...@perl.org, Allison Randal, bugs-bi...@rt.perl.org
On Sunday 21 January 2007 23:56:09 Allison Randal wrote:

> When generating a stub PMC with F<tools/dev/gen_class.pl>, the generated
> stub terminates the compile process the first time miniparrot is run.
> This is because the freshly generated stub overrides the C<namespace>
> method to return a null PMC.

I can't reproduce this now; the generated stub doesn't seem to have a
namespace method.

There's a C<pmc_namespace> method.

-- c

0 new messages