| Summary: | [amd64] 32bit application on FreeBSD-6.3 amd64 gets SIGBUS | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Chitti Nimmagadda <Chitti.Nimmagadda> |
| Component: | amd64 | Assignee: | freebsd-amd64 (Nobody) <amd64> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: freebsd-bugs->freebsd-amd64 With a little bit of hesitation, move this one over to the amd64 category, in hopes that it will be a little more high-profile there. Setting the PCB_32BIT flag in pcb_flags(file sys/amd64/ia32/ia32_signal.c, line 760) is resolving the issue State Changed From-To: open->closed Fixed in HEAD and 8.x (r180992) and MFC'ed to 7.x (r181752). I can confirm that the example application compiled with the according gcc line to produce a 32bit binary no longer crashes with SIGBUS. Since 6.x went EoL: close this PR. |
I'm running a 32bit application on amd64 FreeBSD-6.3 and the application is getting a SIGBUS. The issue can be reproduced with the following test program "foo.c" ==== main() { char c1; static int a; static int b; static int c; int d; while(1) { a = b; b = c; c = a; } } ==== The program is compiled using the following command: gcc -g -m32 -L/usr/lib32 -B/usr/lib32 -o foo foo.c following is the info from gdb == freebsd64bit# ./foo ^C freebsd64bit# ./foo ^C freebsd64bit# ./foo ^C freebsd64bit# ./foo Bus error (core dumped) freebsd64bit# gdb -c foo.core foo GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... Core was generated by `foo'. Program terminated with signal 10, Bus error. Reading symbols from /usr/lib32/libc.so.6...done. Loaded symbols for /usr/lib32/libc.so.6 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x08048501 in main () at foo.c:10 10 a = b; (gdb) x/i 0x08048501 0x8048501 <main+33>: mov %eax,0x80496dc (gdb) == system details: OS 6.3 FreeBSD amd64 CPU: Intel(R) Xeon(R) CPU X5355 @ 2.66GHz (2666.78-MHz K8-class CPU) Memory: 16GB The issue is reproducible only on the SMP kernel. This issue is not reproducible all the times, but occurs more frequently within the first 5mins after the machine is booted (after the login prompt) Any solution or workaround exist for this issue? Thanks, Chitti.