[cfe-dev] Does a inline assembly or a memory barrier disable optimizations in a function

PaX Team pageexec at freemail.hu
Sun Aug 2 10:25:19 PDT 2015


On 2 Aug 2015 at 12:24, Jeffrey Walton wrote:

> On Sun, Aug 2, 2015 at 11:49 AM, Reid Kleckner <rnk at google.com> wrote:
> > That construct is just a memory barrier that applies to escaped objects.
> > Dead stores to unescaped locals for example will be removed during SSA
> > conversion.
> >
> OK, thanks. That should probably be documented because its different
> behavior from GCC.
> 
> Its important information for someone writing a zeroizer for
> compliance reasons, like FIPS 140. (it might even cause a security
> related defect).

please see https://llvm.org/bugs/show_bug.cgi?id=15495




More information about the cfe-dev mailing list