{"record":{"id":"2cc2be56f4aea171","repo":"deepseek-ai/deepseek-harness","slug":"process-information-layout-mismatch-koffi-compute","errorCode":null,"errorMessage":"PROCESS_INFORMATION layout mismatch: koffi computed ${PROCESS_INFORMATION.size}, header probe says ${abi.PROCESS_INFORMATION_SIZE}","messagePattern":"PROCESS_INFORMATION layout mismatch: koffi computed (.+?), header probe says (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/sandbox/sandbox-windows-acl/src/ffi.ts","lineNumber":176,"sourceCode":"  hStdInput: PVOID,\n  hStdOutput: PVOID,\n  hStdError: PVOID,\n})\n\n/** koffi PROCESS_INFORMATION layout; its size is asserted against abi.PROCESS_INFORMATION_SIZE at load. */\nexport const PROCESS_INFORMATION = koffi.struct('PROCESS_INFORMATION', {\n  hProcess: PVOID,\n  hThread: PVOID,\n  dwProcessId: 'uint32',\n  dwThreadId: 'uint32',\n})\n\n/* v8 ignore start -- layout-mismatch guards fire only on ABI breakage; verify/abi-probe.cpp pins both sizes. */\nif (STARTUPINFOW.size !== abi.STARTUPINFOW_SIZE) {\n  throw new Error(`STARTUPINFOW layout mismatch: koffi computed ${STARTUPINFOW.size}, header probe says ${abi.STARTUPINFOW_SIZE}`)\n}\nif (PROCESS_INFORMATION.size !== abi.PROCESS_INFORMATION_SIZE) {\n  throw new Error(`PROCESS_INFORMATION layout mismatch: koffi computed ${PROCESS_INFORMATION.size}, header probe says ${abi.PROCESS_INFORMATION_SIZE}`)\n}\n/* v8 ignore stop */\n\n/**\n * Allocate one pointer-sized slot (for `T **` out-parameters).\n * @returns the allocated slot pointer.\n */\nexport function allocPtrSlot(): NativePtr {\n  const value: unknown = koffi.alloc(PVOID, 1)\n  return value as NativePtr\n}\n\n/**\n * Allocate one uint32 slot.\n * @returns the allocated slot pointer.\n */\nexport function allocUint32(): NativePtr {\n  const value: unknown = koffi.alloc('uint32', 1)","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/sandbox/sandbox-windows-acl/src/ffi.ts#L158-L194","documentation":"Error \"PROCESS_INFORMATION layout mismatch: koffi computed ${PROCESS_INFORMATION.size}, header probe says ${abi.PROCESS_INFORMATION_SIZE}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/sandbox/sandbox-windows-acl/src/ffi.ts:176 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rebuild or update the addon/koffi so the PROCESS_INFORMATION struct size matches the header ABI probe."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}