-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b143
if a gtest test hits vmassert/guarantee/fatal/etc, no core or hs_err file will be generated, even if we are using fully inited jvm. that makes it really hard to understand a root cause of a failure and hence fix a defect.
currently, we won't even get file name and line number for an assert, here is a small patch which fixes that and can be used as a temp. workaround till we fix this bug. this patch also will help to investigate "vmassert failures" from tests which do not have a inited jvm :
diff -r 602a51769ce8 src/share/vm/utilities/vmError.cpp
--- a/src/share/vm/utilities/vmError.cpp Fri Sep 02 19:19:03 2016 +0300
+++ b/src/share/vm/utilities/vmError.cpp Fri Sep 02 20:40:33 2016 +0300
@@ -1137,6 +1137,14 @@ void VMError::report_and_die(int id, con
Thread* thread, address pc, void* siginfo, void* context, const char* filename,
int lineno, size_t size)
{
+ if (ExecutingUnitTests) {
+ fprintf(stderr, "%s:%d %s ", filename, lineno, message);
+ va_list va;
+ va_copy(va, detail_args);
+ vfprintf(stderr, detail_fmt, va);
+ va_end(va);
+ fprintf(stderr, "\n");
+ }
currently, we won't even get file name and line number for an assert, here is a small patch which fixes that and can be used as a temp. workaround till we fix this bug. this patch also will help to investigate "vmassert failures" from tests which do not have a inited jvm :
diff -r 602a51769ce8 src/share/vm/utilities/vmError.cpp
--- a/src/share/vm/utilities/vmError.cpp Fri Sep 02 19:19:03 2016 +0300
+++ b/src/share/vm/utilities/vmError.cpp Fri Sep 02 20:40:33 2016 +0300
@@ -1137,6 +1137,14 @@ void VMError::report_and_die(int id, con
Thread* thread, address pc, void* siginfo, void* context, const char* filename,
int lineno, size_t size)
{
+ if (ExecutingUnitTests) {
+ fprintf(stderr, "%s:%d %s ", filename, lineno, message);
+ va_list va;
+ va_copy(va, detail_args);
+ vfprintf(stderr, detail_fmt, va);
+ va_end(va);
+ fprintf(stderr, "\n");
+ }
- is blocked by
-
JDK-8166925 several native TESTs should be changed to TEST_VM
-
- Resolved
-