| commit | cf54e0dfc67184f6494841a484170dc86ec9ad9a | [log] [tgz] |
|---|---|---|
| author | Chesnay Schepler <chesnay@apache.org> | Fri Oct 11 11:44:02 2024 +0200 |
| committer | GitHub <noreply@github.com> | Fri Oct 11 11:44:02 2024 +0200 |
| tree | fd8d345f69681652670057f71bada87bd1c7e77e | |
| parent | 2949815de621efab4d362bb2ee2c30058c8744a2 [diff] |
[FLINK-36511] Prevent StackOverflow in FlinkSecurityManager
diff --git a/flink-core/src/main/java/org/apache/flink/core/security/FlinkSecurityManager.java b/flink-core/src/main/java/org/apache/flink/core/security/FlinkSecurityManager.java index cab2768..05faf6f 100644 --- a/flink-core/src/main/java/org/apache/flink/core/security/FlinkSecurityManager.java +++ b/flink-core/src/main/java/org/apache/flink/core/security/FlinkSecurityManager.java
@@ -181,6 +181,8 @@ // At this point, exit is determined. Halt if defined, otherwise check ended, JVM will call // System.exit if (haltOnSystemExit) { + // null the security manager to prevent infinite recursion + System.setSecurityManager(null); Runtime.getRuntime().halt(status); } }