Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/templateTable_x86_64.cpp @ 3249:e1162778c1c8
7009266: G1: assert(obj->is_oop_or_null(true )) failed: Error
Summary: A referent object that is only weakly reachable at the start of concurrent marking but is re-attached to the strongly reachable object graph during marking may not be marked as live. This can cause the reference object to be processed prematurely and leave dangling pointers to the referent object. Implement a read barrier for the java.lang.ref.Reference::referent field by intrinsifying the Reference.get() method, and intercepting accesses though JNI, reflection, and Unsafe, so that when a non-null referent object is read it is also logged in an SATB buffer.
Reviewed-by: kvn, iveresov, never, tonyp, dholmes
author | johnc |
---|---|
date | Thu, 07 Apr 2011 09:53:20 -0700 |
parents | 8033953d67ff |
children | 92add02409c9 |
comparison
equal
deleted
inserted
replaced
3248:e6beb62de02d | 3249:e1162778c1c8 |
---|---|
145 __ movq(rdx, obj.base()); | 145 __ movq(rdx, obj.base()); |
146 } | 146 } |
147 } else { | 147 } else { |
148 __ leaq(rdx, obj); | 148 __ leaq(rdx, obj); |
149 } | 149 } |
150 __ g1_write_barrier_pre(rdx, r8, rbx, val != noreg); | 150 __ g1_write_barrier_pre(rdx /* obj */, |
151 rbx /* pre_val */, | |
152 r15_thread /* thread */, | |
153 r8 /* tmp */, | |
154 val != noreg /* tosca_live */, | |
155 false /* expand_call */); | |
151 if (val == noreg) { | 156 if (val == noreg) { |
152 __ store_heap_oop_null(Address(rdx, 0)); | 157 __ store_heap_oop_null(Address(rdx, 0)); |
153 } else { | 158 } else { |
154 __ store_heap_oop(Address(rdx, 0), val); | 159 __ store_heap_oop(Address(rdx, 0), val); |
155 __ g1_write_barrier_post(rdx, val, r8, rbx); | 160 __ g1_write_barrier_post(rdx /* store_adr */, |
161 val /* new_val */, | |
162 r15_thread /* thread */, | |
163 r8 /* tmp */, | |
164 rbx /* tmp2 */); | |
156 } | 165 } |
157 | 166 |
158 } | 167 } |
159 break; | 168 break; |
160 #endif // SERIALGC | 169 #endif // SERIALGC |