[krbdev.mit.edu #8514] git commit
Tom Yu via RT
rt-comment at krbdev.mit.edu
Mon Jan 9 17:53:32 EST 2017
Make zap() more reliable
The gcc assembly version of zap() could still be optimized out under
gcc 5.1 or later, and the krb5int_zap() function could be optimized
out with link-time optimization. Based on work by Zhaomo Yang and
Brian Johannesmeyer, use the C11 memset_s() when available, then fall
back to a memory barrier with gcc or clang, and finally fall back to
using krb5int_zap(). Modify krb5int_zap() to use a volatile pointer
in case link-time optimization is used.
(cherry picked from commit c163275f899b201dc2807b3ff2949d5e2ee7d838)
https://github.com/krb5/krb5/commit/f468bec257787f0656c70ef1f247d43be2796245
Author: Greg Hudson <ghudson at mit.edu>
Committer: Tom Yu <tlyu at mit.edu>
Commit: f468bec257787f0656c70ef1f247d43be2796245
Branch: krb5-1.14
src/aclocal.m4 | 2 ++
src/include/k5-int.h | 43 +++++++++++++++++++++++--------------------
src/util/support/zap.c | 5 ++++-
3 files changed, 29 insertions(+), 21 deletions(-)
More information about the krb5-bugs
mailing list