[K42-discussion] race condition in clustered object call on unoptimized build
Michal Ostrowski
mostrows at watson.ibm.com
Mon Feb 13 01:36:56 EST 2006
On Sun, 2006-02-12 at 09:00 -0500, Bryan S Rosenburg wrote:
>
> You've missed my point. We want every "DREF(ref)" to dereference ref
> exactly once. The problem that's been reported is that the compiler
> is dereferencing ref more than once for a single DREF instance.
> Burying the dereference in a volatile asm would keep the compiler
> from doing that.
Yes.
Actually, if you enforced certain compiler optimizations you could
ensure that given:
DREF(obj)->x();
DREF(obj)->y();
The result of both DREF()'s would always be the same; so that within a
given functional scope you could never see "obj" becoming deleted.
Michal
More information about the K42-discussion
mailing list