)]}'
{
  "commit": "293753821089b3d0d3f0d6c36539135f945ca7fb",
  "tree": "f3446c257f7a861ffc0c74cf6ceeb8e293e31797",
  "parents": [
    "025ea891faaffa832116e5411bfcdb70d256b494"
  ],
  "author": {
    "name": "David Neto",
    "email": "dneto@google.com",
    "time": "Mon Dec 19 15:46:57 2022 -0500"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Dec 19 15:46:57 2022 -0500"
  },
  "message": "Fix undef behaviour in hex float parsing (#5025)\n\nWhen the parser saw more significant hex digits than fit in\r\nthe target type, it would compute a nonsensical shift amount, resulting\r\nin undefined behaviour.\r\n\r\nNow, drop the excess bits, effectively truncating the significand.\r\n\r\nAlso guard against overflow of the exponent in the extraordinary (and untested)\r\ncase where we see more than, for example, 2**(32-4+1) significant hex digits\r\nfor a 32-bit float, or 2**(16-4+1) significant hex digits for a 16-bit\r\nfloat.\r\n\r\nAlso guard against overflow of the indexing counting the number of\r\nsignificant bits.  When that would occur silently drop any further\r\nsignificant bits.  (Untested)\r\n\r\nAvoid hex floats in C++ code. It\u0027s a C++17 feature.\r\n\r\nFixes: #4724",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "06e3c57572c96d4bc76a36bc072c2b792d41cf85",
      "old_mode": 33188,
      "old_path": "source/util/hex_float.h",
      "new_id": "98353a4ad2803a65dd3eceaf51b21742c814b078",
      "new_mode": 33188,
      "new_path": "source/util/hex_float.h"
    },
    {
      "type": "modify",
      "old_id": "25d3c707a78b1ab7518e12e6f36ac0fc701784ad",
      "old_mode": 33188,
      "old_path": "test/hex_float_test.cpp",
      "new_id": "a44d9ec7933825e0586f506db02120ae9d82455c",
      "new_mode": 33188,
      "new_path": "test/hex_float_test.cpp"
    }
  ]
}
