# HG changeset patch # User mlarsson # Date 1516694147 -3600 # Node ID 8f451978683ce3193c302f6140ecf05afee1754a # Parent 6738bf66931485b3f01099cd379d9b5def07132b 8170941: Executing gtest with invalid -Xlog argument crashes gtestLauncher Reviewed-by: rehn, stuefe diff -r 6738bf669314 -r 8f451978683c test/hotspot/gtest/gtestMain.cpp --- a/test/hotspot/gtest/gtestMain.cpp Mon Jan 22 14:14:26 2018 -0800 +++ b/test/hotspot/gtest/gtestMain.cpp Tue Jan 23 08:55:47 2018 +0100 @@ -111,7 +111,11 @@ const char* name = test_info.name(); if (!_is_initialized && is_suffix("_test_vm", name)) { // we want to have hs_err and core files when we execute regular tests - ASSERT_EQ(0, init_jvm(_argc, _argv, false)) << "Could not initialize the JVM"; + int ret_val = init_jvm(_argc, _argv, false); + if (ret_val != 0) { + ADD_FAILURE() << "Could not initialize the JVM"; + exit(1); + } _is_initialized = true; } }