)]}'
{
  "commit": "ca4ba3996768dc0c8035a620d7e4d424db192f15",
  "tree": "2b9292b0af3a7729266fe3e3dcaa43574f59aa9d",
  "parents": [
    "767ab72c1f6fc11d7d075e6f06548af0ea9f6008"
  ],
  "author": {
    "name": "Aryk Ledet",
    "email": "arykledet@google.com",
    "time": "Wed Apr 22 21:28:06 2026 +0000"
  },
  "committer": {
    "name": "Aryk Ledet",
    "email": "arykledet@google.com",
    "time": "Thu Apr 23 16:02:41 2026 +0000"
  },
  "message": "[cper-lib] Implement CperDecoder and refactor safe accessors\n\nIntroduces a `CperDecoder` library to safely parse UEFI CPER records and\nrefactors the codebase to centralize safe memory access patterns. This ensures\nfull compatibility with UBSan and strict alignment toolchains.\n\nKey Changes:\n- CperDecoder: Added a new `uefi::cper::CperDecoder` class that provides a\nrobust interface for parsing CPER records. It performs signature validation,\nboundary checks for section descriptors, and provides safe access to section\nbodies via std::span.\n- Centralized getField: Moved the `getField\u003cT\u003e` helper to `include/cper.hpp`.\nThis allows the decoder and unit tests to share a single implementation for\nsafely reading members of unaligned packed structs using memcpy.\n- Hardened gmtime_r: Added explicit return value checks for `gmtime_r` calls,\nthrowing `std::runtime_error` on failure to ensure reliability when processing\ntimestamps.\n- Refactored Tests: Updated `cper_encoder_test.cpp` to use the new\n`CperDecoder` for its assertions. This simplifies the test logic and verifies\nthe decoder\u0027s functionality through round-trip testing.\n- New Test Coverage: Added unit tests for the decoder to verify handling of\ntruncated headers, invalid signatures, and malformed section counts.\n\nTested:\n- All 9 unit tests passed via Meson inside the gbmc_dev container.\n- All tests passed via Bazel/Blaze using the Google cc_toolchain.\n- Built an experimental cli tool on google3 using the decoder on AsicCper logs\nfrom sdhb and compared the output to the CFA\n\nGoogle-Bug-Id: 505395424\nChange-Id: I02a385a591f7ccee8fc9e3e28ee4e79755170656\nSigned-off-by: Aryk Ledet \u003carykledet@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "500cf6e86c12a7cba53bf60d139d5121e861031f",
      "old_mode": 33188,
      "old_path": "include/cper.hpp",
      "new_id": "4f75521b438639df094fd98faf51fb9dcedcf47e",
      "new_mode": 33188,
      "new_path": "include/cper.hpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "498c8761c42e5251f731367492900d7b2191b30b",
      "new_mode": 33188,
      "new_path": "include/cper_decoder.hpp"
    },
    {
      "type": "modify",
      "old_id": "1003aba0898bcbdcf7092f62458465a304636ceb",
      "old_mode": 33188,
      "old_path": "meson.build",
      "new_id": "a951bdf20983d2ced5bf6b3c99668a607fc8cc13",
      "new_mode": 33188,
      "new_path": "meson.build"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a2efa991f0aee493ccdf1bb5a35895fb66481363",
      "new_mode": 33188,
      "new_path": "test/cper_decoder_test.cpp"
    },
    {
      "type": "modify",
      "old_id": "8a8e7f4d71e057568e9570f5b8e038ed709d4b91",
      "old_mode": 33188,
      "old_path": "test/cper_encoder_test.cpp",
      "new_id": "1de0facc24c51616b9845985534d12688e6f0305",
      "new_mode": 33188,
      "new_path": "test/cper_encoder_test.cpp"
    },
    {
      "type": "modify",
      "old_id": "1fdc5374257045901d7ead057056526c962ff4b2",
      "old_mode": 33188,
      "old_path": "test/meson.build",
      "new_id": "66ea45e45b260795ecb691ce504659e14eb2a62f",
      "new_mode": 33188,
      "new_path": "test/meson.build"
    }
  ]
}
