This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] explicit_bzero final


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]