[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#344615: missinglib: ftbfs [sparc] *** [test] Bus error



On Mon, 2 Jan 2006, Julien Cristau wrote:

Hi,

I reproduced this and tried to debug with gdb, but I didn't find any
obvious bug, so I'll cc: debian-sparc for their help.
The bus error seems to happen in caml_format_float (from
byterun/floats.c in the ocaml source); gdb gives the following:
(gdb) run
Starting program: /tmp/missinglib-0.4.10.debian/test/runtests.opt
........................................................
Program received signal SIGBUS, Bus error.
0x0005f698 in caml_format_float ()
(gdb) where
#0  0x0005f698 in caml_format_float ()
#1  0x0006a3ec in caml_c_call ()

0x0005f680 <caml_format_float+240>:     call  0x5d110 <caml_stat_alloc>
0x0005f684 <caml_format_float+244>:     nop
0x0005f688 <caml_format_float+248>:     mov  %o0, %l0
0x0005f68c <caml_format_float+252>:     mov  %l0, %o0
0x0005f690 <caml_format_float+256>:     mov  %i0, %o1
0x0005f694 <caml_format_float+260>:     call  0x7d814 <sprintf>
0x0005f698 <caml_format_float+264>:     ldd  [ %i1 ], %o2
0x0005f69c <caml_format_float+268>:     call  0x5d3d4 <caml_copy_string>

ldd is a double-word load, so the first argument (the memory location) must be double-word aligned. I bet it's not (what's the value of %i1?) and that's what causes the bus error.

Best regards,

Jurij Smakov                                        jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/                   KeyID: C99E03CC



Reply to: