[cfe-dev] making -ftrivial-auto-var-init=zero a first-class option

Kees Cook via cfe-dev cfe-dev at lists.llvm.org
Wed Apr 22 10:36:37 PDT 2020

On Tue, Apr 21, 2020 at 08:43:07PM -0700, JF Bastien wrote:
> > Apple
> > 
> > I can't speak meaningfully here, but I've heard rumors that they are
> > depending on zero-init as well. Perhaps someone there can clarify how
> > they are using these features?
> What I can easily share is in my LLVM dev meeting talk: https://www.youtube.com/watch?v=I-XUHPimq3o <https://www.youtube.com/watch?v=I-XUHPimq3o>
> There I say that we’ve at least deployed it in Secure Enclave code, and XNU. I’ve seen people on the internet find other places we seem to have deployed it :-)

Looks like you mention XNU at minute 24? I would infer that pattern init
is being used rather than zero?

Watching this also reminded me about the benefit of NULL pointers matching
existing "is the pointer NULL?" checks, instead of getting treated like
an allocation -- another behavioral improvement under zero-init.

Kees Cook

More information about the cfe-dev mailing list