Some C++ binaries coredumps with Bus error

Nezmer bsd at nezmer.info
Sat May 8 16:16:22 UTC 2010


Hi,

I'm having trouble with some C++ binaries. They coredumps with Bus
error. backtraces always end up with:

Cannot access memory at address 0x800000000000

An example of those binaries is pkgdata. A binary used as a part
of building icu4c.

I rebuilt gcc45, world and kernel with debugging symbols enabled. The
weird part, no coredumps occur when kernel debugging symbols are 
present. But they occur when the kernel is stripped and "*.symbols" files are removed. So I think the problem
lies between the kernel and world.

gdb output:

Core was generated by `pkgdata'.
Program terminated with signal 10, Bus error.
Reading symbols from ../lib/libicutu.so.44...done.
Loaded symbols for ../lib/libicutu.so.44
Reading symbols from ../lib/libicuuc.so.44...done.
Loaded symbols for ../lib/libicuuc.so.44
Reading symbols from /lib/libthr.so.3...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from ../lib/libicui18n.so.44...done.
Loaded symbols for ../lib/libicui18n.so.44
Reading symbols from /lib/gcc45/libstdc++.so.6...done.
Loaded symbols for /lib/gcc45/libstdc++.so.6
Reading symbols from /lib/gcc45/libgcc_s.so.1...done.
Loaded symbols for /lib/gcc45/libgcc_s.so.1
Reading symbols from ../stubdata/libicudata.so.44...done.
Loaded symbols for ../stubdata/libicudata.so.44
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  strcpy () at
fbsd8/src/8_stable-build/lib/libc/amd64/string/strcpy.S:48
48              movq    %rdx,(%rdi)
[New Thread 8022041c0 (LWP 100161)]

(gdb) bt full
#0  strcpy () at
fbsd8/src/8_stable-build/lib/libc/amd64/string/strcpy.S:48
No locals.
#1  0x0000000000401993 in runCommand () at pkgdata.cpp:1536
        command = Cannot access memory at address 0x0

Line 1536 (pkgdata.cpp):
    int32_t     ln=0; /* line number */

(gdb) bt
#0  strcpy () at
fbsd8/src/8_stable-build/lib/libc/amd64/string/strcpy.S:48
#1  0x0000000000401993 in runCommand () at pkgdata.cpp:1536
#2  0x6d742f74756f2f2e in ?? ()
#3  0x615f6c6c6f632f70 in ?? ()
#4  0x7365725f47455f72 in ?? ()
#5  0x74756f2f2e206f2e in ?? ()
#6  0x6c6f632f706d742f in ?? ()
#7  0x5f51495f72615f6c in ?? ()
.
.
<similar lines>
.
.
#2730 0x5f676e616c2f706d in ?? ()
#2731 0x65725f49465f7673 in ?? ()
#2732 0x756f2f2e206f2e73 in ?? ()
Cannot access memory at address 0x800000000000


System info:
AMD64 GENERIC 8-STABLE(206611)
GCC 4.5(20100429)

Any ideas why this is happening and why with some C++ binaries only?


More information about the freebsd-stable mailing list