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


---
osname= linux
osvers= 2.6.12
arch=   x86_64-linux-thread-multi
cc=     cc 
---
Flags:
    category=core
    severity=medium
    ack=no
---
As mentioned on IRC, from time to time I get strange results in
my x86_64 platform that I don't run into under a 32-bit
environment.  Leo asked me to file a ticket the next time I came
across the issue -- thus this message.

I'm running a fresh checkout of r12014.  I wrote a simple test 
program (t.pir attached) that uses "dumper.pir" to dump the 
contents of one of PGE's internal variables.  On my 64-bit 
environment (SUSE 10 Professional Linux) I get very strange 
output and the strings appear to have been corrupted.  On
my 32-bit environment, the output is exactly as I would
expect it to be.

Here are the files I'm attaching to this message:

    t.pir         - test program
    dump_32.txt   - output from my 32-bit environment (expected output)
    dump_64.txt   - output from my 64-bit system

Notice in the dump_64.txt the way that the keys and
values of various hash entries appear to have been
corrupted.

Command used to produce output files:

    ./parrot t.pir >dump_xx.txt

I'm quite willing to admit that the problem may be in PGE
itself -- perhaps PGE is failing to initialize a register
or using a hash incorrectly and it's only being exposed under
x86_64.  Any clues or suggestions on this bug will be
greatly appreciated, and if I can provide further details
or run the test with different options, I'll be happy to do 
that as well.

Thanks,

Pm

---
Summary of my parrot 0.4.2 (r12014) configuration:
  configdate='Fri Mar 24 21:37:23 2006'
  Platform:
    osname=linux, archname=x86_64-linux-thread-multi
    jitcapable=0, jitarchname=nojit,
    jitosname=linux, jitcpuarch=x86_64
    execcapable=0
    perl=/usr/bin/perl
  Compiler:
    cc='cc', ccflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
-DDEBUGGING  -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC',
  Linker and Libraries:
    ld='cc', ldflags=' -L/usr/local/lib64',
    cc_ldflags='',
    libs='-lm -ldl -lcrypt -lpthread -lrt'
  Dynamic Linking:
    share_ext='.so', ld_share_flags='-shared -L/usr/local/lib64 -fPIC',
    load_ext='.so', ld_load_flags='-shared -L/usr/local/lib64 -fPIC'
  Types:
    iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
    ptrsize=8, ptr_alignment=1 byteorder=12345678, 
    nv=double, numvalsize=8, doublesize=8

---
Environment:
    HOME    LANG    LANGUAGE    LD_LIBRARY_PATH    LOGDIR    PATH    SHELL
.sub main
    load_bytecode "PGE.pbc"
    load_bytecode "dumper.pir"
    load_bytecode "PGE/Dumper.pir"

    $P0 = find_global "PGE::P6Rule", "$optable"
    "_dumper"($P0)

.end

    
"VAR1" => PMC 'PGE::OPTable' 
    Hash {
        "circumfix:( )" => Hash {
            "equiv" => "=",
            "key_close" => ")",
            "match" => "PGE::Exp::Group",
            "mode" => 6417,
            "name" => "circumfix:( )"
        },
        "circumfix:[ ]" => Hash {
            "equiv" => "=",
            "key_close" => "]",
            "match" => "PGE::Exp::Group",
            "mode" => 6417,
            "name" => "circumfix:[ ]"
        },
        "close:)" => Hash {
            "equiv" => "=",
            "match" => "PGE::Match",
            "mode" => 800,
            "name" => "close:)"
        },
        "close:>" => Hash {
            "equiv" => "<<<<<<=",
            "match" => "PGE::Match",
            "mode" => 4896,
            "name" => "close:>"
        },
        "close:]" => Hash {
            "equiv" => "=",
            "match" => "PGE::Match",
            "mode" => 800,
            "name" => "close:]"
        },
        "close:}" => Hash {
            "equiv" => "<<<<<<=",
            "match" => "PGE::Match",
            "mode" => 4896,
            "name" => "close:}"
        },
        "infix:" => Hash {
            "equiv" => "<<=",
            "match" => "PGE::Exp::Concat",
            "mode" => 5670,
            "name" => "infix:"
        },
        "infix:&" => Hash {
            "equiv" => "<<<=",
            "match" => "PGE::Exp::Conj",
            "mode" => 5666,
            "name" => "infix:&"
        },
        "infix::=" => Hash {
            "equiv" => "<>=",
            "match" => "PGE::Exp::Alias",
            "mode" => 1574,
            "name" => "infix::="
        },
        "infix:|" => Hash {
            "equiv" => "<<<<=",
            "match" => "PGE::Exp::Alt",
            "mode" => 5666,
            "name" => "infix:|"
        },
        "postfix:*" => Hash {
            "equiv" => "<=",
            "match" => PMC 'Sub' { ... },
            "mode" => 545,
            "name" => "postfix:*"
        },
        "postfix:+" => Hash {
            "equiv" => "<=",
            "match" => \VAR1["postfix:*"]["match"],
            "mode" => 545,
            "name" => "postfix:+"
        },
        "postfix::" => Hash {
            "equiv" => "<=",
            "match" => PMC 'Sub' { ... },
            "mode" => 545,
            "name" => "postfix::"
        },
        "postfix:?" => Hash {
            "equiv" => "<=",
            "match" => \VAR1["postfix:*"]["match"],
            "mode" => 545,
            "name" => "postfix:?"
        },
        "prefix::" => Hash {
            "equiv" => "<<<<<=",
            "match" => PMC 'Sub' { ... },
            "mode" => 5137,
            "name" => "prefix::"
        },
        "term:" => Hash {
            "equiv" => "=",
            "match" => PMC 'Sub' { ... },
            "mode" => 4368,
            "name" => "term:"
        },
        "term:$" => Hash {
            "equiv" => "=",
            "match" => PMC 'Sub' { ... },
            "mode" => 4368,
            "name" => "term:$"
        },
        "term:$$" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Anchor",
            "mode" => 4368,
            "name" => "term:$$"
        },
        "term:." => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => "term:."
        },
        "term:::" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Cut",
            "mode" => 4368,
            "name" => "term:::"
        },
        "term::::" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Cut",
            "mode" => 4368,
            "name" => "term::::"
        },
        "term:<" => Hash {
            "equiv" => "=",
            "match" => PMC 'Sub' { ... },
            "mode" => 4368,
            "name" => "term:<"
        },
        "term:<+[" => Hash {
            "equiv" => "=",
            "match" => PMC 'Sub' { ... },
            "mode" => 4368,
            "name" => "term:<+["
        },
        "term:<-[" => Hash {
            "equiv" => "=",
            "match" => \VAR1["term:<+["]["match"],
            "mode" => 4368,
            "name" => "term:<-["
        },
        "term:<?" => Hash {
            "equiv" => "=",
            "match" => \VAR1["term:<"]["match"],
            "mode" => 4368,
            "name" => "term:<?"
        },
        "term:<[" => Hash {
            "equiv" => "=",
            "match" => \VAR1["term:<+["]["match"],
            "mode" => 4368,
            "name" => "term:<["
        },
        "term:<commit>" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Commit",
            "mode" => 4368,
            "name" => "term:<commit>"
        },
        "term:\B" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Anchor",
            "mode" => 4368,
            "name" => "term:\\B"
        },
        "term:\D" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => "term:\\D"
        },
        "term:\S" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => "term:\\S"
        },
        "term:\W" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => "term:\\W"
        },
        "term:\b" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Anchor",
            "mode" => 4368,
            "name" => "term:\\b"
        },
        "term:\d" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => "term:\\d"
        },
        "term:\n" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => "term:\\n"
        },
        "term:\s" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => "term:\\s"
        },
        "term:\w" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => "term:\\w"
        },
        "term:^" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Anchor",
            "mode" => 4368,
            "name" => "term:^"
        },
        "term:^^" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Anchor",
            "mode" => 4368,
            "name" => "term:^^"
        },
        "term:{{" => Hash {
            "equiv" => "=",
            "match" => PMC 'Sub' { ... },
            "mode" => 4368,
            "name" => "term:{{"
        }
    }
    Hash {
        "" => ResizablePMCArray (size:2) [
            \VAR1["term:"],
            \VAR1["infix:"]
        ],
        "$" => \VAR1["term:$"],
        "$$" => \VAR1["term:$$"],
        "&" => \VAR1["infix:&"],
        "(" => \VAR1["circumfix:( )"],
        ")" => \VAR1["close:)"],
        "*" => \VAR1["postfix:*"],
        "+" => \VAR1["postfix:+"],
        "." => \VAR1["term:."],
        ":" => ResizablePMCArray (size:2) [
            \VAR1["postfix::"],
            \VAR1["prefix::"]
        ],
        "::" => \VAR1["term:::"],
        ":::" => \VAR1["term::::"],
        ":=" => \VAR1["infix::="],
        "<" => \VAR1["term:<"],
        "<+[" => \VAR1["term:<+["],
        "<-[" => \VAR1["term:<-["],
        "<?" => \VAR1["term:<?"],
        "<[" => \VAR1["term:<["],
        "<commit>" => \VAR1["term:<commit>"],
        ">" => \VAR1["close:>"],
        "?" => \VAR1["postfix:?"],
        "[" => \VAR1["circumfix:[ ]"],
        "\B" => \VAR1["term:\B"],
        "\D" => \VAR1["term:\D"],
        "\S" => \VAR1["term:\S"],
        "\W" => \VAR1["term:\W"],
        "\b" => \VAR1["term:\b"],
        "\d" => \VAR1["term:\d"],
        "\n" => \VAR1["term:\n"],
        "\s" => \VAR1["term:\s"],
        "\w" => \VAR1["term:\w"],
        "]" => \VAR1["close:]"],
        "^" => \VAR1["term:^"],
        "^^" => \VAR1["term:^^"],
        "{{" => \VAR1["term:{{"],
        "|" => \VAR1["infix:|"],
        "}" => \VAR1["close:}"]
    }
    Hash {
        "$" => 2,
        "&" => 1,
        "(" => 1,
        ")" => 1,
        "*" => 1,
        "+" => 1,
        "." => 1,
        ":" => 3,
        "<" => 8,
        ">" => 1,
        "?" => 1,
        "[" => 1,
        "\" => 2,
        "]" => 1,
        "^" => 2,
        "{" => 2,
        "|" => 1,
        "}" => 1
    }
"VAR1" => PMC 'PGE::OPTable' 
    Hash {
        "circumfix:( )" => PMC 'None' { ... },
        "circumfix:[ ]" => \0I�["circumfix:( )"],
        "close:)" => Hash {
            "equiv" => "=",
            "match" => "PGE::Match",
            "mode" => 800,
            "name" => "close:)"
        },
        "close:>" => Hash {
            "equiv" => "<<<<<<=",
            "match" => "PGE::Match",
            "mode" => 4896,
            "name" => "close:>"
        },
        "close:]" => Hash {
            "equiv" => "=",
            "match" => "PGE::Match",
            "mode" => 800,
            "name" => "close:]"
        },
        "close:}" => Hash {
            "equiv" => "<<<<<<=",
            "match" => "PGE::Match",
            "mode" => 4896,
            "name" => "close:}"
        },
        "infix:" => Hash {
            "equiv" => "<<=",
            "match" => "PGE::Exp::Concat",
            "mode" => 5670,
            "name" => "infix:"
        },
        "infix:&" => Hash {
            "equiv" => "<<<=",
            "match" => "PGE::Exp::Conj",
            "mode" => 5666,
            "name" => "infix:&"
        },
        "infix::=" => Hash {
            "equiv" => "<>=",
            "match" => "PGE::Exp::Alias",
            "mode" => 1574,
            "name" => "infix::="
        },
        "infix:|" => Hash {
            "equiv" => "<<<<=",
            "match" => "PGE::Exp::Alt",
            "mode" => 5666,
            "name" => "infix:|"
        },
        "postfix:*" => Hash {
            "equiv" => "<=",
            "match" => PMC 'Sub' { ... },
            "mode" => 545,
            "name" => "postfix:*"
        },
        "postfix:+" => Hash {
            "equiv" => "<=",
            "match" => \0I�["postfix:*"]["match"],
            "mode" => 545,
            "name" => "postfix:+"
        },
        "postfix::" => Hash {
            "equiv" => "<=",
            "match" => PMC 'Sub' { ... },
            "mode" => 545,
            "name" => "postfix::"
        },
        "postfix:?" => Hash {
            "equiv" => "<=",
            "match" => \0I�["postfix:*"]["match"],
            "mode" => 545,
            "name" => "postfix:?"
        },
        "prefix::" => Hash {
            "equiv" => "<<<<<=",
            "match" => PMC 'Sub' { ... },
            "mode" => 5137,
            "name" => "prefix::"
        },
        "term:" => \0I�["circumfix:( )"],
        "term:$" => \0I�["circumfix:( )"],
        "term:$$" => \0I�["circumfix:( )"],
        "term:." => \0I�["circumfix:( )"],
        "term:::" => \0I�["circumfix:( )"],
        "term::::" => \0I�["circumfix:( )"],
        "term:<" => \0I�["circumfix:( )"],
        "term:<+[" => Hash {
            "equiv" => "=",
            "match" => PMC 'Sub' { ... },
            "mode" => 4368,
            "name" => "term:<+["
        },
        "term:<-[" => Hash {
            "equiv" => "=",
            "match" => \0I�["term:<+["]["match"],
            "mode" => 4368,
            "name" => "term:<-["
        },
        "term:<?" => \0I�["circumfix:( )"],
        "term:<[" => \0I�["circumfix:( )"],
        "term:<commit>" => \0I�["circumfix:( )"],
        "term:\B" => \0I�["circumfix:( )"],
        "term:\D" => \0I�["circumfix:( )"],
        "term:\S" => \0I�["circumfix:( )"],
        "term:\W" => \0I�["circumfix:( )"],
        "term:\b" => \0I�["circumfix:( )"],
        "term:\d" => \0I�["circumfix:( )"],
        "term:\n" => \0I�["circumfix:( )"],
        "term:\s" => \0I�["circumfix:( )"],
        "term:\w" => \0I�["circumfix:( )"],
        "term:^" => \0I�["circumfix:( )"],
        "term:^^" => \0I�["circumfix:( )"],
        "term:{{" => Hash {
            "equiv" => "=",
            "match" => PMC 'Sub' { ... },
            "mode" => 4368,
            "name" => "term:{{"
        }
    }
    Hash {
        "" => ResizablePMCArray (size:2) [
            Hash {
                "equiv" => "=",
                "match" => PMC 'Sub' { ... },
                "mode" => 4368,
                "name" => "pE\207\000\000"
            },
            \0I�["infix:"]
        ],
        "" => Hash {
            "equiv" => "=",
            "match" => PMC 'Sub' { ... },
            "mode" => 4368,
            "name" => "\260<\207\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => "\260A\207\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => PMC 'Sub' { ... },
            "mode" => 4368,
            "name" => "PB\207\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Anchor",
            "mode" => 4368,
            "name" => "@C\207\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => \0I�["term:<+["]["match"],
            "mode" => 4368,
            "name" => "\020<\207\000\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Anchor",
            "mode" => 4368,
            "name" => "\340C\207\000\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Anchor",
            "mode" => 4368,
            "name" => "\360B\207\000\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Anchor",
            "mode" => 4368,
            "name" => "\240B\207\000\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Anchor",
            "mode" => 4368,
            "name" => "0D\207\000\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => \0I�[""]["match"],
            "mode" => 4368,
            "name" => "`<\207\000\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => "`A\207\000\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => "\020A\207\000\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => "[EMAIL PROTECTED]"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => " @\207\000\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => "\320?\207\000\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => "\200?\207\000\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::CCShortcut",
            "mode" => 4368,
            "name" => "0?\207\000\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Cut",
            "mode" => 4368,
            "name" => "\320D\207\000\000\000\000"
        },
        "" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Cut",
            "mode" => 4368,
            "name" => "\200D\207\000\000\000\000\000"
        },
        "mmit>" => Hash {
            "equiv" => "=",
            "match" => "PGE::Exp::Commit",
            "mode" => 4368,
            "name" => "\000=\207\000\000\000\000\000mmit>"
        },
        "&" => \0I�["infix:&"],
        "(" => Hash {
            "equiv" => "=",
            "key_close" => ")",
            "match" => "PGE::Exp::Group",
            "mode" => 6417,
            "name" => "\360=\207\000\000\000\000\000x:( )"
        },
        ")" => \0I�["close:)"],
        "*" => \0I�["postfix:*"],
        "+" => \0I�["postfix:+"],
        ":" => ResizablePMCArray (size:2) [
            \0I�["postfix::"],
            \0I�["prefix::"]
        ],
        ":=" => \0I�["infix::="],
        "<+[" => \0I�["term:<+["],
        "<-[" => \0I�["term:<-["],
        ">" => \0I�["close:>"],
        "?" => \0I�["postfix:?"],
        "[" => Hash {
            "equiv" => "=",
            "key_close" => "]",
            "match" => "PGE::Exp::Group",
            "mode" => 6417,
            "name" => "\220>\207\000\000\000\000\000x:[ ]"
        },
        "]" => \0I�["close:]"],
        "{{" => \0I�["term:{{"],
        "|" => \0I�["infix:|"],
        "}" => \0I�["close:}"]
    }
    Hash {
        "" => 8,
        "" => 3,
        "" => 2,
        "" => 2,
        "" => 2,
        "" => 1,
        "&" => 1,
        "(" => 1,
        ")" => 1,
        "*" => 1,
        "+" => 1,
        ">" => 1,
        "?" => 1,
        "[" => 1,
        "]" => 1,
        "{" => 2,
        "|" => 1,
        "}" => 1
    }

Reply via email to