This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/69976] Zero the local stack on function exit
- From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Mar 2016 14:58:26 +0000
- Subject: [Bug middle-end/69976] Zero the local stack on function exit
- Auto-submitted: auto-generated
- References: <bug-69976-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69976
--- Comment #9 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Created attachment 37972
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37972&action=edit
Crude test case
In case it's helpful, here's a crude attempt at a black-box test case for this:
read a secret into an auto buffer in one function, and then see if it's
readable in another function.
Currently fails with exit code 2 on trunk (with warning âsecurity_sensitiveâ
attribute directive ignored [-Wattributes])
(Naturally we'd want white-box testing also, to verify that the generated code
contains zeroing code).