)]}'
{
  "commit": "d6747fef78ea9985c5fce51a7c912f8593c16879",
  "tree": "2400ef1af65ed2add258f12021346633d6330707",
  "parents": [
    "f204c708b5f8c440d9235dee12948f8ace0dc7f3"
  ],
  "author": {
    "name": "David Young",
    "email": "davidayoung@meta.com",
    "time": "Thu Nov 19 18:07:31 2026 -0500"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Thu Nov 19 15:17:55 2026 -0800"
  },
  "message": "[lldb] Don\u0027t crash on a PE image read from memory that llvm::object rejects (#241902)\n\nObjectFilePECOFF::CreateMemoryInstance builds an object file from the\n512 bytes lldb reads at a module\u0027s header address. ParseHeader can parse\nthe headers and section table from that, but\nllvm::object::COFFObjectFile often can\u0027t; the export table and other\ndata directories point past the end of the buffer. CreateInstance\nrejects a file whose binary can\u0027t be created, but CreateMemoryInstance\nkeeps the object, and m_binary stays null.\n\nParseSymtab, GetSectionDataSize and GetTlsIndexAddress dereference\nm_binary without checking it. Loading such a module makes lldb look for\nits symbol file, which parses the symbol table and crashes in\nAppendFromExportTable. Check the binary there, as GetUUID and\nParseDependentModules already do.\n\nMeta hit this with a Linux core of a .NET process. .NET assemblies are\nPE files, the process maps them as plain files, and the core saved the\nfirst page of one of them. Creating a module from that memory with\nSBModule(process, address), or with a dynamic loader that loads every\nmapped file, crashed lldb.\n\nassisted with: claude\n\nGitOrigin-RevId: 25e383913aa5c0b862456e490c1e46814e43a904\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ac7dd8c967f4e62a11bcb195cee5cf9cc5218c38",
      "old_mode": 33188,
      "old_path": "source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp",
      "new_id": "0f86ae6b7097baa3a7d5b80149313a68aacaf3a3",
      "new_mode": 33188,
      "new_path": "source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp"
    },
    {
      "type": "modify",
      "old_id": "923097348d97146312b279e51ddb7d22a1fa1a4f",
      "old_mode": 33188,
      "old_path": "source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h",
      "new_id": "05a5a80db87d89e527988a055a0cf60be9d5c759",
      "new_mode": 33188,
      "new_path": "source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "dc9fb31aaac6b4ba76b5e2ec55b2173536b95098",
      "new_mode": 33188,
      "new_path": "test/Shell/ObjectFile/PECOFF/module-from-memory-header-only.yaml"
    }
  ]
}
