RFR: 8352946: SEGV_BND signal code of SIGSEGV missing from our signal-code table

Matthias Baesken mbaesken at openjdk.org
Thu Mar 27 08:08:06 UTC 2025


On Wed, 26 Mar 2025 14:24:55 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> On Linux we had recently a crash looking like this
> 
> 
> siginfo_t @ 0x00007fff2723dc98:
>   Signal: 11 (SIGSEGV)
>   Signal Code: 3 (unknown signal code)
>   Address of faulting memory reference: 0x007fff8c31629838
> 
> 
> Seems signal code 3 is
> `#define SEGV_BNDERR 3 /* failed address bound checks */`
> 
> so we should add this to our signal code table; on AIX I cannot find this code so it might be Linux-only.
> Even on Linux the define is not always available in the system headers so we better add a define .

Yeah true, there is potentially more 

/* `si_code' values for SIGSEGV signal.  */
enum
{
  SEGV_MAPERR = 1,              /* Address not mapped to object.  */
#  define SEGV_MAPERR   SEGV_MAPERR
  SEGV_ACCERR,                  /* Invalid permissions for mapped object.  */
#  define SEGV_ACCERR   SEGV_ACCERR
  SEGV_BNDERR,                  /* Bounds checking failure.  */
#  define SEGV_BNDERR   SEGV_BNDERR
  SEGV_PKUERR,                  /* Protection key checking failure.  */
#  define SEGV_PKUERR   SEGV_PKUERR
  SEGV_ACCADI,                  /* ADI not enabled for mapped object.  */
#  define SEGV_ACCADI   SEGV_ACCADI
  SEGV_ADIDERR,                 /* Disrupting MCD error.  */
#  define SEGV_ADIDERR  SEGV_ADIDERR
  SEGV_ADIPERR                  /* Precise MCD exception.  */
#  define SEGV_ADIPERR  SEGV_ADIPERR
};

but I only wanted to add the one we really saw recently in a crash.
I will check a few more old hserr , maybe I find more other sigcodes we do not cover currently.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24255#issuecomment-2757072772


More information about the hotspot-runtime-dev mailing list