浏览代码

Explicitly tell Netty to not use unsafe

With the security permissions that we grant to Netty, Netty can not
access unsafe (because it relies on having the runtime permission
accessDeclaredMembers and the reflect permission
suppressAccessChecks). Instead, we should just explicitly tell Netty to
not use unsafe. This commit adds a flag to the default jvm.options to
tell Netty to not look for unsafe.

Relates #19786
Jason Tedor 9 年之前
父节点
当前提交
eb6da69e9f
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      distribution/src/main/resources/config/jvm.options

+ 3 - 0
distribution/src/main/resources/config/jvm.options

@@ -59,6 +59,9 @@
 # use our provided JNA always versus the system one
 -Djna.nosys=true
 
+# flag to explicitly tell Netty to not use unsafe
+-Dio.netty.noUnsafe=true
+
 ## heap dumps
 
 # generate a heap dump when an allocation from the Java heap fails