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

SIGSEGV on write to NativeCallStack::EMPTY_STACK

    XMLWordPrintable

Details

    • Verified

    Backports

      Description

        NativeCallStack::EMPTY_STACK is declared const

        const NativeCallStack NativeCallStack::EMPTY_STACK(0, false);

        But it's written to here:

          // Construct NativeCallStack::EMPTY_STACK. It may get constructed twice,
          // but it is benign, the results are the same.
          ::new ((void*)&NativeCallStack::EMPTY_STACK) NativeCallStack(0, false);

        Writing to a const global is catch-on-fire and it appears that when recent clangs (>= clang-6.0) compile this, EMPTY_STACK is placed in read-only storage, resulting in SIGSEGV.

        Attachments

          Issue Links

            Activity

              People

                zgu Zhengyu Gu
                martin Martin Buchholz
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: