This was ultimately my error but clearer error handling could have saved me an hour or two. While working on https://bugs.openjdk.org/browse/JDK-8292561, I tried to make ReplayCompiles a product (diagnostic) switch. Depending on ReplayCompiles, however, we set UseDebuggerErgo. UseDebuggerErgo is a notproduct switch. So I found that setting a notproduct switch in a product build just crashes. And if that happens before os_init in early arg parsing, we won't even have a signal handler in place, so no hs-err file, just "Segmentation Fault". You just cannot run a debug VM here to see assert since the error depends on the VM being product. Therefore, a guarantee somewhere would be helpful. Here's a reproducer: ===================== diff src/hotspot/share/gc/shared/gcConfig.cpp void GCConfig::select_gc_ergonomically() { + FLAG_SET_ERGO(CheckCompressedOops, true); if (os::is_server_class_machine()) { ===================== # The VM exits with no apparent error message $ java -version; echo $? 139
|