#254: pbc compat: t/native_pbc/number.t: New failure on some platforms
---------------------+------------------------------------------------------
Reporter: jkeenan | Owner: rurban
Type: bug | Status: reopened
Priority: normal | Milestone:
Component: core | Version:
Severity: high | Resolution:
Keywords: 64bit | Lang:
Patch: new | Platform: all
---------------------+------------------------------------------------------
Comment(by rurban):
tt254-64bit-2.patch fixes now all remaining 64bit bugs when reading 32bit
pbc.
1. major bug: ALIGN_16 may not be used on 64bit reading 32bit, or any
other low->high combination. We must advance in bytes and not in native
ptrs, because we might need the to advance by the half of 8 => 4, which is
impossible.
2. minor bug: fetch_op_le_4() reading a signed int (4 byte) to a signed
long (8 byte) will not adjust the sign when the long is big enough, but we
have negative vtable indices, which we missed. I added a Parrot_Int4 cast
since we are expecting 4-byte ints.
There are compiler warnings though which might be fatal on stricter
compilers:
{{{
src/packfile.c: In function 'pf_register_standard_funcs':
src/packfile.c:1547: warning: initialization from incompatible pointer
type
src/packfile.c: In function 'PackFile_Segment_unpack':
src/packfile.c:1869: warning: assignment from incompatible pointer type
src/packfile.c: In function 'directory_unpack':
src/packfile.c:1985: warning: passing argument 2 of 'PF_fetch_opcode' from
incompatible pointer type
src/packfile.c:1995: warning: passing argument 2 of 'PF_fetch_opcode' from
incompatible pointer type
src/packfile.c:2002: warning: passing argument 2 of 'PF_fetch_cstring'
from incompatible pointer type
src/packfile.c:2009: warning: passing argument 2 of 'PF_fetch_opcode' from
incompatible pointer type
src/packfile.c:2012: warning: passing argument 2 of 'PF_fetch_opcode' from
incompatible pointer type
src/packfile.c:2061: warning: assignment from incompatible pointer type
src/packfile.c:2070: warning: passing argument 2 of 'PF_fetch_opcode' from
incompatible pointer type
src/packfile.c:2075: warning: assignment discards qualifiers from pointer
target type
src/packfile.c:2110: warning: assignment discards qualifiers from pointer
target type
}}}
Can someone look at these please?
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/254#comment:25>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets