From owner-freebsd-stable@FreeBSD.ORG Sat May 8 16:16:21 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E2203106572D for ; Sat, 8 May 2010 16:16:21 +0000 (UTC) (envelope-from bsd@nezmer.info) Received: from mail.nezmer.info (nezmer.info [97.107.142.36]) by mx1.freebsd.org (Postfix) with ESMTP id 60E3E8FC15 for ; Sat, 8 May 2010 16:16:21 +0000 (UTC) Date: Sat, 8 May 2010 19:16:15 +0300 From: Nezmer To: freebsd-stable@freebsd.org Message-ID: <20100508161615.GA5648@mail> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Some C++ binaries coredumps with Bus error X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 16:16:22 -0000 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 ?? () . . . . #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?