提交 67299e6d 编写于 作者: T twisti

7012339: JSR 292 crash in G1SATBCardTableModRefBS::write_ref_field_pre_work()

Reviewed-by: jrose, never
上级 eddbd11c
/*
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -99,14 +99,14 @@ void ConstantPoolCacheEntry::set_bytecode_2(Bytecodes::Code code) {
// current value.
void ConstantPoolCacheEntry::set_f1_if_null_atomic(oop f1) {
// Use barriers as in oop_store
HeapWord* f1_addr = (HeapWord*) &_f1;
oop* f1_addr = (oop*) &_f1;
update_barrier_set_pre(f1_addr, f1);
void* result = Atomic::cmpxchg_ptr(f1, f1_addr, NULL);
bool success = (result == NULL);
if (success) {
update_barrier_set((void*) f1_addr, f1);
}
update_barrier_set(f1_addr, f1);
}
}
#ifdef ASSERT
// It is possible to have two different dummy methodOops created
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册