Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 May 2020 22:18:44 +0200 (CEST)
From:      Paul FLOYD <pjfloyd@wanadoo.fr>
To:        freebsd-hackers@freebsd.org
Subject:   SIGBUS si_code 12
Message-ID:  <2102917207.11671.1589487524169.JavaMail.www@wwinf1n11>

next in thread | raw e-mail | index | archive | help

Hi
 
It seems as though SIGBUS can have an si_code of 12. 

This isn't documented in the siginfo manpage (https://www.freebsd.org/cgi/man.cgi?query=siginfo&apropos=0&sektion=3&manpath=FreeBSD+12.1-
RELEASE+and+Ports&arch=default&format=html). which only covers these 3 values for si_code.


SIGBUS BUS_ADRALN invalid address alignment
BUS_ADRERR nonexistent physical address
BUS_OBJERR object-specific hardware error

Is this a defect in the siginfo documentation?


Here's an extract from trap.c that shows this.


if (signo == SIGSEGV) {
ucode = SEGV_MAPERR;
} else if (prot_fault_translation == 0) {
/*
* Autodetect. This check also covers
* the images without the ABI-tag ELF
* note.
*/
if (SV_CURPROC_ABI() == SV_ABI_FREEBSD &&
p->p_osrel >= P_OSREL_SIGSEGV) {
signo = SIGSEGV;
ucode = SEGV_ACCERR;
} else {
signo = SIGBUS;
ucode = T_PAGEFLT;
}
} else if (prot_fault_translation == 1) {
/*
* Always compat mode.
*/
signo = SIGBUS;
ucode = T_PAGEFLT;
}

A+
Paul



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2102917207.11671.1589487524169.JavaMail.www>