comparison src/share/vm/ci/ciMethod.cpp @ 20670:6a528388c7da

8060147: SIGSEGV in Metadata::mark_on_stack() while marking metadata in ciEnv Reviewed-by: kvn, roland, coleenp, mgerdin
author vlivanov
date Tue, 11 Nov 2014 04:46:13 -0800
parents 119875f0fc67
children 7848fc12602b
comparison
equal deleted inserted replaced
20669:e194d26c9f4e 20670:6a528388c7da
66 66
67 // ------------------------------------------------------------------ 67 // ------------------------------------------------------------------
68 // ciMethod::ciMethod 68 // ciMethod::ciMethod
69 // 69 //
70 // Loaded method. 70 // Loaded method.
71 ciMethod::ciMethod(methodHandle h_m) : ciMetadata(h_m()) { 71 ciMethod::ciMethod(methodHandle h_m, ciInstanceKlass* holder) :
72 ciMetadata(h_m()),
73 _holder(holder)
74 {
72 assert(h_m() != NULL, "no null method"); 75 assert(h_m() != NULL, "no null method");
73 76
74 // These fields are always filled in in loaded methods. 77 // These fields are always filled in in loaded methods.
75 _flags = ciFlags(h_m()->access_flags()); 78 _flags = ciFlags(h_m()->access_flags());
76 79
122 _can_be_statically_bound = false; 125 _can_be_statically_bound = false;
123 126
124 // generating _signature may allow GC and therefore move m. 127 // generating _signature may allow GC and therefore move m.
125 // These fields are always filled in. 128 // These fields are always filled in.
126 _name = env->get_symbol(h_m()->name()); 129 _name = env->get_symbol(h_m()->name());
127 _holder = env->get_instance_klass(h_m()->method_holder());
128 ciSymbol* sig_symbol = env->get_symbol(h_m()->signature()); 130 ciSymbol* sig_symbol = env->get_symbol(h_m()->signature());
129 constantPoolHandle cpool = h_m()->constants(); 131 constantPoolHandle cpool = h_m()->constants();
130 _signature = new (env->arena()) ciSignature(_holder, cpool, sig_symbol); 132 _signature = new (env->arena()) ciSignature(_holder, cpool, sig_symbol);
131 _method_data = NULL; 133 _method_data = NULL;
132 // Take a snapshot of these values, so they will be commensurate with the MDO. 134 // Take a snapshot of these values, so they will be commensurate with the MDO.