Browse Source

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 years ago
parent
commit
eb6da69e9f
1 changed files with 3 additions and 0 deletions
  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