Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8353568

SEGV_BNDERR signal code adjust definition

XMLWordPrintable

    • b18
    • generic
    • linux

        There was a remark from Thomas Stuefe https://github.com/openjdk/jdk24u/pull/175

        Hmm, okay.

        That means that when we build on an older machine, and Linux kernels change the constant in newer kernel releases, we may use the wrong number.

        What I would do is this:

        #define SEGV_BNDERR_value 3
        #if defined(SEGV_BNDERR)
        STATIC_ASSERT(SEGV_BNDERR == SEGV_BNDERR_value);
        #else
        #define SEGV_BNDERR SEGV_BNDERR_value
        #endif
        The static assert will alert us if we build on a newer Linux version and turns out we were wrong with our assumed number.

              mbaesken Matthias Baesken
              mbaesken Matthias Baesken
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: