SIGBUS
Bus error: a memory access the hardware or the mapping cannot satisfy.
- Linux number
- 7
- FreeBSD number
- 10
- Default action
- Terminate and dump core
- Catch, block or ignore
- Allowed
- Standard
- POSIX.1-2001
On Linux the common sources are touching a mmap(2) page past the end of the backing file, a file truncated under a live mapping, a misaligned access on a strict-alignment CPU, and hardware memory errors. If a file you mapped shrinks, the next access to the gone page gets SIGBUS, not SIGSEGV.
Compare it
- SIGSEGV vs SIGBUS · Why did this memory access fail?
Related syscalls
- madvise(2)Linux · Memory
Advise the kernel how a memory range will be used: free it, page it out, exclude it from dumps.
Sources
Numbers are Linux on x86 and arm64; alpha, mips, sparc and parisc number some signals differently. Spot one that's wrong? Tell Rod.