This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: obvious race condition in darwin/netbsd __enable_execute_stackdue to caching pagesize/mask


Daniel Jacobowitz wrote on 27 August 2008 16:15:

> On Wed, Aug 27, 2008 at 02:45:25PM +0100, Dave Korn wrote:
>> Jay wrote on 27 August 2008 09:55:
>> 
>>> Yeah that's probably ok.
>>> Volatile is enough to force the ordering?
>> 
>>   Absolutely; it's a defined part of the standard that all volatile
>> side-effects must complete in-order.  GCC will not move code past a
>> volatile operation.
> 
> It's still not sufficient without a memory barrier.

  Yes, you're right.  Of course, if we just don't cache mask at all, the
problem goes away.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]