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

Bus errors in floatvalarray.t on HP-UX

0 views
Skip to first unread message

Nick Glencross

unread,
Jan 3, 2006, 11:37:56 AM1/3/06
to p6i
Guy,

There are a few red splodged in smoke on HP-UX which I can elaborate on.

The actual line causing problems is list.c:1042 (r10861) , and I
suspect are caused by pointer alignment, but frustratingly gdb doesn't
help much.

# ./parrot t/pmc/floatvalarray_4.pasm
Bus error(coredump)

A typical backtrace is:

#0 0x001b8528 in list_set (interpreter=0x400694d8, list=0x40261d68,
item=0x7f7f09e0, type=-99, idx=15) at src/list.c:1042
#1 0x001ba384 in list_unshift (interpreter=0x400694d8, list=0x40261d68,
item=0x7f7f09e0, type=-99) at src/list.c:1843
#2 0x002d8fb0 in Parrot_FloatvalArray_unshift_float (interpreter=0x400694d8,
pmc=0x4027db00, value=1) at src/classes/floatvalarray.pmc:208
#3 0x002d8f38 in Parrot_FloatvalArray_unshift_float ()
at src/classes/floatvalarray.pmc:227
#4 0x001671bc in Parrot_unshift_p_nc (cur_opcode=0x402b5f3c,
interpreter=0x400694d8) at src/ops/pmc.ops:440
#5 0x001670e8 in Parrot_unshift_p_nc () at src/ops/pmc.ops:442
#6 0x001b1040 in runops_slow_core (interpreter=0x400694d8, pc=0x402b5f3c)
at src/runops_cores.c:157
#7 0x001b0eb0 in runops_slow_core () at src/runops_cores.c:84
#8 0x001032a4 in runops_int (interpreter=0x400694d8, offset=0)
at src/interpreter.c:761
#9 0x00104d1c in runops (interpreter=0x400694d8, offs=0)
at src/inter_run.c:81
#10 0x00105120 in runops_args (interpreter=0x400694d8, sub=0x4027db48,
obj=0x400c5ab0, meth=0x0, sig=0x400032c0 "vP", ap=0x7f7f06a4)
at src/inter_run.c:180
#11 0x00105344 in Parrot_runops_fromc_args (interpreter=0x400694d8,
sub=0x4027db48, sig=0x400032c0 "vP") at src/inter_run.c:274
#12 0x000e47e8 in Parrot_runcode (interpreter=0x400694d8, argc=1,
argv=0x7f7f04b0) at src/embed.c:800
#13 0x000d83f8 in main (argc=1, argv=0x7f7f04b0) at compilers/imcc/main.c:648

The problem is on the LHS of

((FLOATVAL *) PObj_bufstart(&chunk->data))[idx] = ...

I've verified this by putting it on a line by itself. Oddly, gdb
doesn't have a problem with it though:

(gdb) print ((FLOATVAL *) chunk->data.obj.u._b._bufstart)[idx]
$1 = 0
(gdb) print sizeof (FLOATVAL)
$2 = 8

The base bufstart address 0x4007dd1c is a multiple of 4, but not of 8,
which supports that it's an alignment issue.

Nick

0 new messages