From 68c43e760ff22dfd94ab6f2c05cea3d53190439a Mon Sep 17 00:00:00 2001 From: David Cuthbert Date: Sat, 24 Nov 2018 13:48:08 -0800 Subject: [PATCH] Fix compilation errors on Ubuntu 18.04.1. --- src/hotspot/src/share/vm/code/dependencies.cpp | 2 +- src/hotspot/src/share/vm/runtime/fprofiler.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/src/share/vm/code/dependencies.cpp b/src/hotspot/src/share/vm/code/dependencies.cpp index c284160e0e3..c4c8e9b45da 100644 --- a/src/hotspot/src/share/vm/code/dependencies.cpp +++ b/src/hotspot/src/share/vm/code/dependencies.cpp @@ -525,7 +525,7 @@ void Dependencies::write_dependency_to(xmlStream* xtty, xtty->object("x", arg.metadata_value()); } } else { - char xn[10]; sprintf(xn, "x%d", j); + char xn[12]; sprintf(xn, "x%d", j); if (arg.is_oop()) { xtty->object(xn, arg.oop_value()); } else { diff --git a/src/hotspot/src/share/vm/runtime/fprofiler.cpp b/src/hotspot/src/share/vm/runtime/fprofiler.cpp index 58cb6e89daa..89aa0cd8183 100644 --- a/src/hotspot/src/share/vm/runtime/fprofiler.cpp +++ b/src/hotspot/src/share/vm/runtime/fprofiler.cpp @@ -635,7 +635,7 @@ class vmNode : public ProfilerNode { const char *name() const { return _name; } bool is_compiled() const { return true; } - bool vm_match(const char* name) const { return strcmp(name, _name) == 0; } + bool vm_match(const char* name) const { return name == NULL ? false : strcmp(name, _name) == 0; } Method* method() { return NULL; }