Product: Fedora
https://bugzilla.redhat.com/show_bug.cgi?id=957181
Bug ID: 957181
Summary: hawtjni: missing barriers in cache initialization
Product: Fedora
Version: rawhide
Component: hawtjni
Severity: unspecified
Priority: unspecified
Assignee: mgoldman(a)redhat.com
Reporter: fweimer(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: java-sig-commits(a)lists.fedoraproject.org,
mgoldman(a)redhat.com, mizdebsk(a)redhat.com
Blocks: 957130
Category: ---
The following code is generated from the example:
void cachebarFields(JNIEnv *env, jobject lpObject)
{
if (barFc.cached) return;
barFc.clazz = env->GetObjectClass(lpObject);
barFc.a = env->GetFieldID(barFc.clazz, "a", "I");
barFc.b = env->GetFieldID(barFc.clazz, "b", "J");
barFc.c = env->GetFieldID(barFc.clazz, "c", "[B");
barFc.c5 = env->GetFieldID(barFc.clazz, "c5", "B");
barFc.prev = env->GetFieldID(barFc.clazz, "prev", "J");
barFc.cached = 1;
}
There are no barriers, so readers may observe the write to the "cached" member
before the other members.
(One of the barFc.cached checks is redundant, BTW.)
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug
https://bugzilla.redhat.com/token.cgi?t=eKi1w394jB&a=cc_unsubscribe