Mercurial > hg > graal-jvmci-8
comparison src/share/vm/prims/methodHandles.hpp @ 20677:fe34c5ab0b35
8042235: redefining method used by multiple MethodHandles crashes VM
Summary: note all MemberNames created on internal list for adjusting method entries.
Reviewed-by: sspitsyn, dcubed, lfoltan
author | coleenp |
---|---|
date | Wed, 19 Nov 2014 13:02:11 -0500 |
parents | 9063bd8808a7 |
children | 7848fc12602b 157895117ad5 |
comparison
equal
deleted
inserted
replaced
20666:bee8095780db | 20677:fe34c5ab0b35 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
234 | 234 |
235 class MemberNameTable : public GrowableArray<jweak> { | 235 class MemberNameTable : public GrowableArray<jweak> { |
236 public: | 236 public: |
237 MemberNameTable(int methods_cnt); | 237 MemberNameTable(int methods_cnt); |
238 ~MemberNameTable(); | 238 ~MemberNameTable(); |
239 void add_member_name(int index, jweak mem_name_ref); | 239 void add_member_name(jweak mem_name_ref); |
240 oop get_member_name(int index); | |
241 | 240 |
242 #if INCLUDE_JVMTI | 241 #if INCLUDE_JVMTI |
243 public: | |
244 // RedefineClasses() API support: | 242 // RedefineClasses() API support: |
245 // If a MemberName refers to old_method then update it | 243 // If a MemberName refers to old_method then update it |
246 // to refer to new_method. | 244 // to refer to new_method. |
247 void adjust_method_entries(Method** old_methods, Method** new_methods, | 245 void adjust_method_entries(Method** old_methods, Method** new_methods, |
248 int methods_length, bool *trace_name_printed); | 246 int methods_length, bool *trace_name_printed); |
249 private: | |
250 oop find_member_name_by_method(Method* old_method); | |
251 #endif // INCLUDE_JVMTI | 247 #endif // INCLUDE_JVMTI |
252 }; | 248 }; |
253 | 249 |
254 #endif // SHARE_VM_PRIMS_METHODHANDLES_HPP | 250 #endif // SHARE_VM_PRIMS_METHODHANDLES_HPP |