Jarkko Hietaniemi (via RT) wrote:

After the [perl #31029] this one failure remains in IRIX64 (big-endian,
intval and long size 8, int size 4):

The remaining failure has something to with alignment (or lack
thereof, too, and something to do with keyed access):

./parrot t/pmc/nci_20.pasm
10
Bus error

./parrot -t t/pmc/nci_20.pasm
...
    69 push P2, 0       - P2=PerlArray=PMC(0x10615ae0),
    72 push P2, 0       - P2=PerlArray=PMC(0x10615ae0),
    75 assign P5, P2    - P5=UnManagedStruct=PMC(0x10615e40),
P2=PerlArray=PMC(0x10615ae0)
    78 set I0, P5[0]    - I0=0, P5=UnManagedStruct=PMC(0x10615e40),
    82 print I0         - I0=10
    84 print "\n"
10
    86 set I0, P5[1;0]          - I0=10,
P5=UnManagedStruct=PMC(0x10615e40),
Bus error

This is during access of the nested structure pointer. Can you please trace through unmanagedstruct:calc_align. The outer structure is:


   static struct {
       char c;
       struct _x *x;
   } t = { 10, &xx };

The pointer *x _should_ AFAIK get aligned at 8, but the Bus error does indicate a problem here. You could also verifiy the real alignment of the structure, see. src/nci_test.c:nci_pi(), line 186

If I edit away the naughty cast

That's not a cast, it dereferences the struct pointer.

leo



Reply via email to