Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #38314] Assertion on HP-UX at r11242

0 views
Skip to first unread message

Nick Glencross

unread,
Jan 23, 2006, 9:25:27 AM1/23/06
to bugs-bi...@rt.perl.org
# New Ticket Created by Nick Glencross
# Please include the string: [perl #38314]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=38314 >


I've just had a look at why the HP-UX smoke stopped after 17 Jan.

We are currently getting the following assertion:

gcc -o miniparrot -L/usr/local/lib compilers/imcc/main.o \
blib/lib/libparrot.a -lnm -ldld -lm -lcrypt -lsec -lpthread -lBSD
src/null_config.o
Invoking Parrot to generate runtime/parrot/include/config.fpmc --cross
your fingers
./miniparrot config_lib.pasm > runtime/parrot/include/config.fpmc
Assertion failed: (PTR2UINTVAL(mmd_table[i].func_ptr) & 3) == 0, file
src/mmd.c, line 2169
/bin/sh: 26639 Abort(coredump)
make: *** [runtime/parrot/include/config.fpmc] Error 134

This assertion was added at r11242, and looks quite reasonable to me.
A quick investigation shows that the pointer isn't aligned to 4 bytes
(the addresses all end in '2' or 'a'), and printing the actual
function pointer from the PMC init code makes it look like pointers
need not be aligned(!).

Nick

Leopold Toetsch

unread,
Jan 23, 2006, 3:25:36 PM1/23/06
to perl6-i...@perl.org, bugs-bi...@netlabs.develooper.com

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

0 new messages