)]}'
{
  "commit": "2e792a78e495be6df4b8c0a3e41332c2f6dcd911",
  "tree": "96610bcb63f974158805a0a887d7802cdd58725e",
  "parents": [
    "7336a8977d81b7b8c00f2e8ccb8a084afb33b19a"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Fri Dec 13 18:36:34 2024 +0100"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Fri Dec 13 18:36:34 2024 +0100"
  },
  "message": "[gdb] Fix tsan warning: signal handler spoils errno\n\nWhen building gdb with -fsanitize\u003dthread and running test-case\ngdb.base/bg-exec-sigint-bp-cond.exp, I run into:\n...\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d^M\nWARNING: ThreadSanitizer: signal handler spoils errno (pid\u003d25422)^M\n    #0 handler_wrapper gdb/posix-hdep.c:66^M\n    #1 decltype ({parm#2}({parm#3}...)) gdb::handle_eintr\u003c\u003e() \\\n         gdbsupport/eintr.h:67^M\n    #2 gdb::waitpid(int, int*, int) gdbsupport/eintr.h:78^M\n    #3 run_under_shell gdb/cli/cli-cmds.c:926^M\n...\n\nLikewise in:\n- tui_sigwinch_handler with test-case gdb.python/tui-window.exp, and\n- handle_sighup with test-case gdb.base/quit-live.exp.\n\nFix this by saving the original errno, and restoring it before returning [1].\n\nTested on x86_64-linux.\n\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n\n[1] https://www.gnu.org/software/libc/manual/html_node/POSIX-Safety-Concepts.html\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "45ad7b990faa7a741784892f0d1d6fc0e7ac2f68",
      "old_mode": 33188,
      "old_path": "gdb/event-top.c",
      "new_id": "102304cb4ec7333c566708387e90ddedd2b3b219",
      "new_mode": 33188,
      "new_path": "gdb/event-top.c"
    },
    {
      "type": "modify",
      "old_id": "a0d5c585ebc79a97240d2d83f79edecdd4403b97",
      "old_mode": 33188,
      "old_path": "gdb/posix-hdep.c",
      "new_id": "d7d17e6b2f43e8a2658d3d66b850bee2baa52619",
      "new_mode": 33188,
      "new_path": "gdb/posix-hdep.c"
    },
    {
      "type": "modify",
      "old_id": "e9a8e4651ea76101f5fcd0f1c3418f85b07dbb26",
      "old_mode": 33188,
      "old_path": "gdb/tui/tui-win.c",
      "new_id": "414d4699bea7e1cffd8a22439d739e4101abc40c",
      "new_mode": 33188,
      "new_path": "gdb/tui/tui-win.c"
    }
  ]
}
