Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-initialize platform dependent netty classes/values at runtime
Platform dependent classes should not be initialized at build time to avoid issues when running the native executable on a different platform. This patch registers two platform dependent classes for runtime re-initialization and disables the use of `Unsafe` in netty. Unfortunately when re-initializing `PlatformDependent0` it fails to properly setup unsafe accesses resulting in `NullPointerExceptions` when invoking `putByte`. Disabling unsafe accesses for netty works around this. The above changes result in Quarkus native applications to respect arguments like `-Dio.netty.maxDirectMemory=1024` and `-XX:MaxDirectMemorySize=1g`. Fixes #17839
- Loading branch information