On Jan 23, 2006, at 15:25, Nick Glencross (via RT) wrote:
Assertion failed: (PTR2UINTVAL(mmd_table[i].func_ptr) & 3) == 0, file
src/mmd.c, line 2169
Yeah. I have discussed this issue with rafl a few days ago.
This assertion was added at r11242, and looks quite reasonable to me.
Yes, it verfies an assumption, currently used in MMD code, that C
function pointers are at least aligned at 4 byte boundaries.
There is a define C<PARROT_HAS_ALIGNED_FUNCPTR> which changes a few
bits in MMD code, and turns on explicit checks if a given pointer is a
PMC.
Therefore we have 2^H3 strategies:
a) turn on function alignment inside gcc (e.g. -falign-functions=16
used now for gcc/x86)
rafl reported that this didn't work for hpux
b) disable PARROT_HAS_ALIGNED_FUNCPTR for hpux in the hints file,
depend the the assert on that define
c) long term plan: get rid of this MMD hack and the MMD_table, it's too
big[1] anyway
Nick
leo
[1] 1 MB with core PMCs only, no user classes at all created