[compiler-rt] r191190 - [ASan/Win] Slightly optimize the DLL thunk

Timur Iskhodzhanov timurrrr at google.com
Mon Sep 23 12:55:28 PDT 2013


2013/9/23 Reid Kleckner <rnk at google.com>

> "slightly?"  More like hugely.  ;)
>

This shouldn't affect the fast path that much to say "hugely" :)


>
> However, local statics are not thread safe with MSVC yet.  You may want to
> use something like InitOnceExecuteOnce:
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms683493(v=vs.85).aspx
>

Yeah, I'm aware of this.
If we had sequential consistency and no HW or SW optimizations, in the
worst case we'd get an extra function call and write the same value the
second time [or third etc].
I *think* GetProcAddress() also implies some kind of barrier that'd make
the race more "benign".

Not sure if we really want to put an effort to achieve a higher level of
confidence now?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130923/9263fbd0/attachment.html>


More information about the llvm-commits mailing list