]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix profile_flush_to_file() state corruption 475/head
authorGreg Hudson <ghudson@mit.edu>
Thu, 23 Jun 2016 16:01:56 +0000 (12:01 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 1 Jul 2016 18:27:23 +0000 (14:27 -0400)
commit32a05995ff9df0d5ef8aff0d020900a37747670d
tree3f308e497d7ef18ff7aafbe9b35b6672254fe833
parent4131988dec0199287765e1875fe0bbd375656a62
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.

ticket: 8431
target_version: 1.14-next
tags: pullup
src/util/profile/prof_file.c
src/util/profile/prof_test1