-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 11
-
Component/s: hotspot
-
b06
The compiler is free to elide this test, since (this == NULL) can never be true; applying an ordinary member function to NULL invokes undefined behavior. This function needs to be changed.
char* Metadata::print_value_string() const {
char buf[256];
stringStream st(buf, sizeof(buf));
if (this == NULL) {
st.print("NULL");
} else {
print_value_on(&st);
}
return st.as_string();
}
char* Metadata::print_value_string() const {
char buf[256];
stringStream st(buf, sizeof(buf));
if (this == NULL) {
st.print("NULL");
} else {
print_value_on(&st);
}
return st.as_string();
}