# New Ticket Created by  Patrick R. Michaud 
# Please include the string:  [perl #47970]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=47970 >


Yes, that subject line is correct -- I've found a bug
that shows itself _only_ 
   - when I build Parrot using ccache,
   - for one seemingly obscure json test,
   - when running Parrot with the --gc-debug core (e.g., 'make test')
   - for revisions after 23232

It's very consistent, however -- I can reproduce it reliably on
my system.

Here are the details as best I can put them together.
The failing test is t/compilers/json/to_parrot.t #54 .
The code it generates is:

    .sub test :main
        load_bytecode 'compilers/json/JSON.pbc'
        load_bytecode 'library/dumper.pbc'
    
        .local pmc JSON, result
        JSON = compreg "JSON"
        result = JSON("{\"one\":true,\"two\":false,\"three\":null}")
        _dumper(result, "JSON")
    .end

Running this with a normal parrot command line gives:

    $ ./parrot to_parrot_57.pir
    "JSON" => Hash {
        "one" => 1,
        "three" => null,
        "two" => 0
    }

Running this with --gc-debug gives a segmentation fault.
Adding 'say' statements shows that the segfault occurs sometime
during the _dumper() call (i.e., the call to JSON appears to
succeed).

The script I use to build Parrot with ccache looks like:

    make realclean
    CC="ccache gcc"
    CX="ccache g++"
    perl ./Configure.pl --cc="$CC" --cxx="$CX" --link="$CX" --ld="$CX" $@ && 
make

I tried doing the above by hand as well and get the same results.

I'm running Kubuntu 7.10.
Gcc reports gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
ccache reports version 2.4

All packages are the standard ones distributed as part of the
Kubuntu repositories.

If I can provide further details, let me know.  As things stand now,
I can't get 'make test' to pass this one json test when I build Parrot 
using ccache.

Thanks!

Pm

Reply via email to