--- a/src/hotspot/share/classfile/bytecodeAssembler.cpp Wed Nov 13 11:27:50 2019 +0000
+++ b/src/hotspot/share/classfile/bytecodeAssembler.cpp Wed Nov 13 08:23:23 2019 -0500
@@ -54,7 +54,8 @@
_orig->length() + _entries.length(), CHECK_NULL);
cp->set_pool_holder(_orig->pool_holder());
- _orig->copy_cp_to(1, _orig->length() - 1, cp, 1, CHECK_NULL);
+ constantPoolHandle cp_h(THREAD, cp);
+ _orig->copy_cp_to(1, _orig->length() - 1, cp_h, 1, CHECK_NULL);
// Preserve dynamic constant information from the original pool
if (_orig->has_dynamic_constant()) {