[krbdev.mit.edu #8514] git commit
Tom Yu via RT
rt-comment at krbdev.mit.edu
Wed Nov 9 15:32:47 EST 2016
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/100e4aa16ea03faac8346382ee0ba07c84c3df45
Author: Greg Hudson <ghudson at mit.edu>
Committer: Tom Yu <tlyu at mit.edu>
Commit: 100e4aa16ea03faac8346382ee0ba07c84c3df45
Branch: krb5-1.15
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