[PATCH] explicit_bzero final

Florian Weimer fweimer@redhat.com
Thu Dec 15 10:20:00 GMT 2016


On 12/15/2016 10:08 AM, Florian Weimer wrote:
> It's a problem because its semantics are not defined in any sensible
> way.  Even explicit_bzero is impossible to specify properly in C
> standardese due to lack of an observable effect on the language level
> (and so is memset_s), but at least it's reasonably obvious what is
> intended.  Instead of your tracking idea, GCC could just clear all stack
> memory and callee-saved registers upon exit from a function which calls
> explicit_bzero.  It's still an approximation, but any implementation
> retrofitted on an existing compiler will be.

I meant “caller-saved registers”, of course.

Florian



More information about the Libc-alpha mailing list