#254: t/native_pbc/number.t: New failure on some platforms
---------------------+------------------------------------------------------
Reporter: jkeenan | Owner: rurban
Type: bug | Status: assigned
Priority: normal | Milestone:
Component: core | Version:
Severity: high | Keywords:
Lang: | Patch:
Platform: darwin |
---------------------+------------------------------------------------------
Comment(by rurban):
The remaining errors on 64bit boxes loading 32bit .pbc's are caused by
the ALIGN_16 macro in src/packfile.c
Wrong on 64bit platforms:
{{{
#define ALIGN_16(st, cursor) \
(cursor) += (ROUND_16((const unsigned char *)(cursor) - (const
unsigned char *)(st))/OPCODE_T_SIZE)
}}}
correct macro:
{{{
#define ALIGN16(ptr) (const opcode_t *)(((unsigned long)ptr + 15) & (~15))
}}}
usage: cursor = ALIGN16(cursor);
I need to test this further.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/254#comment:14>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets