8208480: Test failure: assert(is_bound() || is_unused()) after JDK-8206075 in C1
authorghaug
Mon, 20 Aug 2018 12:08:07 +0200
changeset 51519 ecb650023e28
parent 51518 2e98c7737d8f
child 51520 ef7852ece52b
8208480: Test failure: assert(is_bound() || is_unused()) after JDK-8206075 in C1 Reviewed-by: kvn, phh, lucy
src/hotspot/share/c1/c1_LIRAssembler.cpp
src/hotspot/share/c1/c1_LIRAssembler.hpp
--- a/src/hotspot/share/c1/c1_LIRAssembler.cpp	Mon Jul 23 18:08:46 2018 +0200
+++ b/src/hotspot/share/c1/c1_LIRAssembler.cpp	Mon Aug 20 12:08:07 2018 +0200
@@ -112,6 +112,9 @@
 
 
 LIR_Assembler::~LIR_Assembler() {
+  // The unwind handler label may be unnbound if this destructor is invoked because of a bail-out.
+  // Reset it here to avoid an assertion.
+  _unwind_handler_entry.reset();
 }
 
 
--- a/src/hotspot/share/c1/c1_LIRAssembler.hpp	Mon Jul 23 18:08:46 2018 +0200
+++ b/src/hotspot/share/c1/c1_LIRAssembler.hpp	Mon Aug 20 12:08:07 2018 +0200
@@ -71,11 +71,7 @@
   void record_non_safepoint_debug_info();
 
   // unified bailout support
-  void bailout(const char* msg) {
-    // reset the label in case it hits assertion in destructor.
-    _unwind_handler_entry.reset();
-    compilation()->bailout(msg);
-  }
+  void bailout(const char* msg) const { compilation()->bailout(msg); }
   bool bailed_out() const                        { return compilation()->bailed_out(); }
 
   // code emission patterns and accessors