[Commits] [wesnoth/wesnoth] 6dfcf2: Detect empty subnamespaces in [clear_global_variab...
GitHub
noreply at github.com
Sun Oct 5 23:39:43 UTC 2014
Branch: refs/heads/1.12
Home: https://github.com/wesnoth/wesnoth
Commit: 6dfcf2746e89fb6b30023ddc452ce047b1b01b20
https://github.com/wesnoth/wesnoth/commit/6dfcf2746e89fb6b30023ddc452ce047b1b01b20
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: ce343566c2421ba60b6136c250033f8dedcb8043
https://github.com/wesnoth/wesnoth/commit/ce343566c2421ba60b6136c250033f8dedcb8043
Author: Ignacio R. Morelle <shadowm at wesnoth.org>
Date: 2014-10-05 (Sun, 05 Oct 2014)
Changed paths:
M changelog
M data/core/units/humans/Horse_Grand_Knight.cfg
M src/construct_dialog.cpp
Log Message:
-----------
Merge branch '1.12' of github.com:wesnoth/wesnoth into 1.12
Conflicts:
changelog
Commit: ab7fa0551ebdba3b5a9cc3869e0cdd9e8f609426
https://github.com/wesnoth/wesnoth/commit/ab7fa0551ebdba3b5a9cc3869e0cdd9e8f609426
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 #22379, also missing its number
Commit: 2eea84c4fcd1ecd18e588f60cad314b43ff4ae71
https://github.com/wesnoth/wesnoth/commit/2eea84c4fcd1ecd18e588f60cad314b43ff4ae71
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
Compare: https://github.com/wesnoth/wesnoth/compare/396b4356b1a1...2eea84c4fcd1
More information about the Commits
mailing list