[Commits] [wesnoth/wesnoth] 6ff2b1: Detect empty subnamespaces in [clear_global_variab...
GitHub
noreply at github.com
Sun Oct 5 23:39:44 UTC 2014
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 6ff2b1c0647b666402cbc65966c9b7a298378356
https://github.com/wesnoth/wesnoth/commit/6ff2b1c0647b666402cbc65966c9b7a298378356
Author: Ignacio R. Morelle <shadowm at wesnoth.org>
Date: 2014-10-05 (Sun, 05 Oct 2014)
Changed paths:
M changelog
M src/persist_context.cpp
Log Message:
-----------
Detect empty subnamespaces in [clear_global_variable] (bug #21093)
Once they become empty, there is no config left behind to clear, which
causes persist_context::get_node() to consistently return NULL.
Previously, this caused a straight null pointer dereference; in order to
guard against undefined behavior, an assertion check was added to
properly terminate execution first.
Neither solution is correct. My understanding of this unwiedly mess is
that persist_file_context::clear_var() recurses outwards from the
original target pruning empty subnamespaces. At some point we are going
to run out of things to delete, so just quit the recursion at that point
and return to the caller and everything should be fine (or so it was in
my test runs with different subnamespace layouts).
(In general, the fact that this code completely lacks documentation of
any sort and has several non-obvious layers to it is a *really* bad sign
for maintainability of this feature in the future. Furthermore, this is
not the first time we have had problems with glogal variables nested in
subnamespaces -- see bug #20385, which was arguably more disastrous in
practice.)
Commit: dc62c5ee275f4cc2150320110128a9ce3dbee8ac
https://github.com/wesnoth/wesnoth/commit/dc62c5ee275f4cc2150320110128a9ce3dbee8ac
Author: Ignacio R. Morelle <shadowm at wesnoth.org>
Date: 2014-10-05 (Sun, 05 Oct 2014)
Changed paths:
M changelog
Log Message:
-----------
Fix misplaced changelog entry for bug #20332
Commit: c388fd780354194bb5b8a707f9b1ef3155d12091
https://github.com/wesnoth/wesnoth/commit/c388fd780354194bb5b8a707f9b1ef3155d12091
Author: Ignacio R. Morelle <shadowm at wesnoth.org>
Date: 2014-10-05 (Sun, 05 Oct 2014)
Changed paths:
M changelog
Log Message:
-----------
Fix changelog entry for bug #22537 missing its number
Commit: 1701388f1e9f2d0e13a3593d8a22a110d7a38516
https://github.com/wesnoth/wesnoth/commit/1701388f1e9f2d0e13a3593d8a22a110d7a38516
Author: Ignacio R. Morelle <shadowm at wesnoth.org>
Date: 2014-10-05 (Sun, 05 Oct 2014)
Changed paths:
M changelog
Log Message:
-----------
Fix changelog entry for bug #22379 missing its number
Compare: https://github.com/wesnoth/wesnoth/compare/41bca14b2114...1701388f1e9f
More information about the Commits
mailing list