missing memset_explicit()

Florian Weimer fweimer@redhat.com
Fri Jun 6 06:28:12 GMT 2025


* Paul Eggert:

> On 6/4/25 12:11, Cristian Rodríguez wrote:
>> Shouldn't this be a compiler builtin that the compiler promises
>> *never* to remove or reorder under any circumstances?
>
> No, as the compiler can remove the builtin if it can prove that the
> storage is never set or used.

And if the value is in one or more registers, we want the compiler to
overwrite those, and not copy the registers to the stack and then use
the glibc function to clear that copy.  Like <stdarg.h>, this isn't
really something that can be implemented in the library.

Thanks,
Florian



More information about the Libc-alpha mailing list