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

Make hardcoded shell invocation with -XX:OnOutOfMemoryError more flexible

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • hotspot
    • x86_64
    • linux

      ADDITIONAL SYSTEM INFORMATION :
      openjdk version "25.0.1" 2025-09-16


      A DESCRIPTION OF THE PROBLEM :
      On posix operating systems it seems that the OnOutOfMemoryError hook is hardcoded to invoke "/bin/sh -c" as wrapper: https://github.com/openjdk/jdk/blob/6b72b778039afce0e25986114d15dd29a6786529/src/hotspot/os/posix/os_posix.cpp#L2110-L2111

      This prevents usage of this feature when no shell is available, for example in hardened container images.
      It would be more flexible to be able to directly specify a binary to be executed, at least using special syntax or a different flag like OnOutOfMemoryErrorExec


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: