Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 May 2020 11:46:21 -0400
From:      Mark Johnston <markj@freebsd.org>
To:        Paul Floyd <pjfloyd@wanadoo.fr>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: SIGBUS si_code 12
Message-ID:  <20200521154621.GB85681@raichu>
In-Reply-To: <9840EA0E-CF11-4332-A5A0-A3CDBA0F0464@wanadoo.fr>
References:  <2102917207.11671.1589487524169.JavaMail.www@wwinf1n11> <490544208.11847.1589489181927.JavaMail.www@wwinf1n11> <20200514224347.GB46537@kib.kiev.ua> <9840EA0E-CF11-4332-A5A0-A3CDBA0F0464@wanadoo.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 15, 2020 at 08:35:53AM +0200, Paul Floyd wrote:
> 
> 
> > On 15 May 2020, at 00:43, Konstantin Belousov <kostikbel@gmail.com> wrote:
> > 
> >> 
> >> 
> >> So presumably this will go away in 12.2.
> > I do not understand what do you mean.  What should go away ?
> > 
> > Also, T_PAGEFLT value for si_code is a compat value that should be
> > explicitly enabled by user, for compatibility with some really old
> > binaries.
> 
> The undocumented behaviour of having a SIGBUS with an si_code that is normally for SIGSEGV.
> 
> From what I’ve seen BUS_OOMERR will be used instead.

Assuming that the context is valgrind, the issue is probably that the
client program is being run with without a NT_FREEBSD_ABI_TAG note, so
the kernel does not have p_osrel defined for the client process and thus
reverts to the legacy behaviour of delivering SIGBUS with UCODE_PAGEFLT.
This behaviour is not documented since it is only present for
compatibility with old binaries.

valgrind should probably embed the NT_FREEBSD_ABI_TAG note from the
target executable into the client process somehow.



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