$RodHat_/search
signal reference

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

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

  1. signal(7), Linux man-pages
  2. signal(3), FreeBSD manual

Numbers are Linux on x86 and arm64; alpha, mips, sparc and parisc number some signals differently. Spot one that's wrong? Tell Rod.