{"record":{"id":"c268c2bc9b5ba888","repo":"stablyai/orca","slug":"verify-linux-glibc-floor-objdump-flag-failed","errorCode":null,"errorMessage":"[verify-linux-glibc-floor] objdump ${flag} failed for ${filePath} (status ${result.status}, signal ${result.signal ?? 'none'}): ${(result.stderr || '').trim()}","messagePattern":"\\[verify-linux-glibc-floor\\] objdump (.+?) failed for (.+?) \\(status (.+?), signal (.+?)\\): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/scripts/verify-linux-glibc-floor.cjs","lineNumber":257,"sourceCode":"/**\n * Run objdump with one flag on `filePath`. Fail-closed: a spawn error, non-zero\n * exit, or signal throws, because a silently-unreadable binary (truncated,\n * corrupt, or an objdump that cannot decode its format) would let a too-new\n * binary slip past the gate.\n */\nfunction runObjdump(objdumpPath, flag, filePath) {\n  const result = spawnSync(objdumpPath, [flag, filePath], {\n    encoding: 'utf8',\n    maxBuffer: 64 * 1024 * 1024,\n    env: cLocaleEnv()\n  })\n  if (result.error) {\n    throw new Error(\n      `[verify-linux-glibc-floor] could not run objdump on ${filePath}: ${result.error.message}`\n    )\n  }\n  if (result.signal || result.status !== 0) {\n    throw new Error(\n      `[verify-linux-glibc-floor] objdump ${flag} failed for ${filePath} ` +\n        `(status ${result.status}, signal ${result.signal ?? 'none'}): ${(result.stderr || '').trim()}`\n    )\n  }\n  return result.stdout || ''\n}\n\n/** DT_NEEDED shared-library names from `objdump -p` (`  NEEDED  <lib>`). */\nfunction parseNeededLibraries(objdumpOutput) {\n  const needed = new Set()\n  for (const line of objdumpOutput.split('\\n')) {\n    const match = line.match(/^\\s+NEEDED\\s+(\\S+)/)\n    if (match) {\n      needed.add(match[1])\n    }\n  }\n  return needed\n}","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/verify-linux-glibc-floor.cjs#L239-L275","documentation":"objdump spawned successfully but exited non-zero or was killed by a signal. Because a truncated, corrupt, or unparseable binary must not slip past the glibc-floor gate, runObjdump treats any non-zero status or signal as fatal and reports the flag, status, signal, and trimmed stderr. This is the deliberate fail-closed contract documented above the function.","triggerScenarios":"result.signal is truthy OR result.status !== 0 at line 256. Happens when objdump cannot parse the file (not a valid ELF / truncated), when the bundled binary is for an architecture objdump doesn't support, or when objdump itself crashes (e.g. OOM-killed, signal).","commonSituations":"A bundled .node that is corrupt or a non-native artifact misclassified by collectNativeBinaries; cross-compiled binaries the host objdump can't decode; a partially-written binary from an interrupted build.","solutions":["Read the trimmed stderr in the message — it usually states the parse failure (e.g. 'File format not recognized').","Rebuild the offending native module so its binary is complete and valid for the target arch.","If the file is genuinely not an ELF native (false positive from collectNativeBinaries), exclude it from the scan or fix the collector's ELF magic check."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const out = runObjdump(objdumpPath, '-p', filePath)\n} catch (error) {\n  // objdump parse failure => suspect corrupt/non-ELF; rebuild the module, do not skip\n  console.error('objdump rejected', filePath, error.message)\n  throw error\n}","preventionTips":["Treat any objdump non-zero exit as a corrupt binary; rebuild the offending native module.","Keep collectNativeBinaries' ELF magic check tight to avoid feeding non-natives to objdump."],"tags":["linux","packaging","glibc","binutils","objdump","fail-closed"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}