]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix profile_flush_to_file() state corruption
authorGreg Hudson <ghudson@mit.edu>
Thu, 23 Jun 2016 16:01:56 +0000 (12:01 -0400)
committerTom Yu <tlyu@mit.edu>
Wed, 6 Jul 2016 20:24:18 +0000 (16:24 -0400)
commitab1aeed87db2d9e5777f99c850aa9b0c6500a6cc
tree71974f6585133a56a4a71306c6d4e47cbb33e140
parentdcc8b9541947024386905d73a966f458e94ac3d5
Fix profile_flush_to_file() state corruption

In write_data_to_file(), do not clear the profile data object's flags.
If the call to this function resulted from profile_flush_to_file(), we
do not want to clear the DIRTY flag, and we especially do not want to
clear the SHARED flag for a data object which is part of
g_shared_trees.  Instead, clear the DIRTY flag in
profile_flush_file_data().

Add a test case to prof_test1 to exercise the bug in unfixed code.
Also modify test1 to abandon the altered profile after flushing it to
a file, to preserve the external behavior of the script before this
fix.

(cherry picked from commit 32a05995ff9df0d5ef8aff0d020900a37747670d)

ticket: 8431
version_fixed: 1.14.3
src/util/profile/prof_file.c
src/util/profile/prof_test1