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

Test runtime/StackGuardPages/TestStackGuardPagesNative.java hangs on some platforms

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 26
    • hotspot
    • None
    • x86_64
    • linux

      Create on behalf of https://github.com/mz1999 which copy from https://github.com/openjdk/jdk/pull/25689

      The TestStackGuardPagesNative.java test hangs and times out on some Linux distributions (e.g., CentOS 7) during the test_native_overflow_initial scenario.

      This issue is a regression introduced by the "hardening" fix in JDK-8295344. That fix correctly replaced a recursive implementation in exeinvoke.c (which caused stack corruption, see JDK-8293452) with an iterative for(;;) loop.

      However, this unbounded loop relies on an incidental SIGSEGV (e.g., SEGV_MAPERR) to terminate. On platforms like CentOS 7, this signal does not occur in a timely manner, causing the native process to hang indefinitely.

      The proposed solution is to make the iterative loop bounded by checking against the previously recorded overflow depth (_kp_rec_count). This retains the benefit of the iterative approach (no stack corruption) while fixing the hang, making the test's behavior deterministic and platform-independent.

            Unassigned Unassigned
            syan Sendao Yan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: