[wesnoth-commits] [wesnoth/wesnoth] 28bf7a: Make WFL's error-reporting machinery thread_local

Charles Dang noreply at github.com
Thu Apr 1 14:19:56 UTC 2021


  Branch: refs/heads/1.14
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 28bf7a58acd5b1906fa5c5023a9dc438a4d03a03
      https://github.com/wesnoth/wesnoth/commit/28bf7a58acd5b1906fa5c5023a9dc438a4d03a03
  Author: Steve Cotton <steve at octalot.co.uk>
  Date:   2021-03-29 (Mon, 29 Mar 2021)

  Changed paths:
    M changelog.md
    M src/formula/function.cpp
    M src/formula/function.hpp

  Log Message:
  -----------
  Make WFL's error-reporting machinery thread_local

To report the WFL call stack in the event of errors, a static stack is used to
record that call-stack. This wasn't thread-safe, and it intermittently crashed
when the game config was movetype patching (the other WFL thread involved is
the GUI2 layout code).

Also a Rule of Three fix for the call_stack_manager class. While this wasn't
the cause of the crash, it could also have lead to a call_stack.pop_back() on
an empty stack.


  Commit: f64af2e6a5c0578d32a969096a52acdaf2a84d2f
      https://github.com/wesnoth/wesnoth/commit/f64af2e6a5c0578d32a969096a52acdaf2a84d2f
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2021-04-01 (Thu, 01 Apr 2021)

  Changed paths:
    M changelog.md
    M src/formula/function.cpp
    M src/formula/function.hpp

  Log Message:
  -----------
  Merge pull request #5645 from stevecotton/wfl_error_thread_114

[1.14] Make WFL's error-reporting machinery thread_local


Compare: https://github.com/wesnoth/wesnoth/compare/75aa74da1b8b...f64af2e6a5c0



More information about the Commits mailing list