Comment #33 on issue 28749 by de...@chromium.org: gcc 4.4-specific renderer  
crash in malloc, memory corruption while loading plugins (?)
http://code.google.com/p/chromium/issues/detail?id=28749

Actually, looking at this code again, it could be probably just rewritten  
as:

   Type* Pointer() {
     // We will hopefully have fast access when the instance is already  
created.
     if (base::subtle::NoBarrier_Load(&state_) != STATE_CREATED)
       EnsureInstance(&buf_, Traits::New, Traits::Delete);

     // This annotation helps race detectors recognize correct lock-less
     // synchronization between different threads calling Pointer().
     // We suggest dynamic race detection tool that
     // "ctor(instance)" in EnsureInstance(...) happens before
     // "return instance" in Pointer().
     // See the corresponding HAPPENS_BEFORE in EnsureInstance(...).
     ANNOTATE_HAPPENS_AFTER(&state_);

     return reinterpret_cast<Type*>(&buf_);
   }

The warning is worried about EnsureInstance, which takes a void*, passing  
the actual
buf_ pointer instead of the punned pointer might also help.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

-- 
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs

Reply via email to