)]}'
{
  "commit": "ab7c1a4d1550f382f6f3ebc82ae8dd96de114fc0",
  "tree": "90a97af25854db8a88add242558291566d7db1d3",
  "parents": [
    "b19001a4b38b633b48f9d709fe3fecd5e9905fd4"
  ],
  "author": {
    "name": "Pali Rohár",
    "email": "pali.rohar@gmail.com",
    "time": "Sun Sep 13 21:09:03 2026 +0200"
  },
  "committer": {
    "name": "LIU Hao",
    "email": "lh_mouse@126.com",
    "time": "Thu Sep 17 11:22:58 2026 +0800"
  },
  "message": "crt: gdtoa: Fix race conditions during initialization of dtoa lock\n\nUse InterlockedExchange() for changing the dtoa_CS_init variable to ensure\nthat new value would be immediately visible in all threads.\n\nWhen a thread saw `dtoa_CS_init \u003d\u003d 0`, it was possible that another thread got\nscheduled and completed initialization, so `dtoa_CS_init` became 2; and then the\ncurrent thread did `last_CS_init \u003d InterlockedExchange (\u0026dtoa_CS_init, 1)` and\nsaw `last_CS_init \u003d\u003d 2` and restored it with `InterlockedExchange (\u0026dtoa_CS_init, 2)`.\nThe value of `dtoa_CS_init` went from 2 to 1 to 2, which was an ABA pattern.\n\nThe other thread which actually completed initialization should only call\n`EnterCriticalSection(\u0026dtoa_CritSec[n])` when it saw `dtoa_CS_init \u003d\u003d 2`. In the\nmiddle of this ABA sequence, the call might get missed.\n\nThe fix is to update `dtoa_CS_init` to 1 with a CAS from 0 so it will not be\nupdated from anything else.\n\nCo-authored-by: LIU Hao \u003clh_mouse@126.com\u003e\nSigned-off-by: LIU Hao \u003clh_mouse@126.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "adc955ec0cbf1fdb37cb379b4a6094c5e07bbe69",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/gdtoa/misc.c",
      "new_id": "74a2ca605547d422b63c46d70a23db7655e9bdc3",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/gdtoa/misc.c"
    }
  ]
}
