{"record":{"id":"e00ff6e9c83352a4","repo":"oven-sh/bun","slug":"arch-must-be-x64-or-aarch64-got-targetar","errorCode":null,"errorMessage":"--arch must be \"x64\" or \"aarch64\", got: ${targetArch}","messagePattern":"--arch must be \"x64\" or \"aarch64\", got: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/verify-baseline.ts","lineNumber":62,"sourceCode":"  // Last resort: resolve as a path (absolute paths like C:\\intel-sde\\sde.exe\n  // pass through unchanged, relative paths resolve against cwd)\n  return resolve(name);\n}\n\nconst emulatorPath = resolveEmulator(values.emulator!);\n\nconst scriptDir = dirname(import.meta.path);\nconst repoRoot = resolve(scriptDir, \"..\");\nconst fixturesDir = join(repoRoot, \"test\", \"js\", \"bun\", \"jsc-stress\", \"fixtures\");\nconst wasmFixturesDir = join(fixturesDir, \"wasm\");\nconst preloadPath = join(repoRoot, \"test\", \"js\", \"bun\", \"jsc-stress\", \"preload.js\");\n\n// Host OS (getVerifyBaselineHost() guarantees host OS == target OS here).\nconst isWindows = process.platform === \"win32\";\n// Target arch (host arch may differ; --arch is explicit).\nconst targetArch = values.arch ?? (process.arch === \"arm64\" ? \"aarch64\" : \"x64\");\nif (targetArch !== \"x64\" && targetArch !== \"aarch64\") {\n  throw new Error(`--arch must be \"x64\" or \"aarch64\", got: ${targetArch}`);\n}\nconst isAarch64 = targetArch === \"aarch64\";\n\n// SDE outputs this when a chip-check violation occurs\nconst SDE_VIOLATION_PATTERN = /SDE-ERROR:.*not valid for specified chip/i;\n\n// Configure emulator based on platform\nconst config = isWindows\n  ? {\n      runnerCmd: [emulatorPath, \"-nhm\", \"--\"],\n      cpuDesc: \"Nehalem (SSE4.2, no AVX/AVX2/AVX512)\",\n      // SDE must run from its own directory for Pin DLL resolution\n      cwd: dirname(emulatorPath),\n    }\n  : isAarch64\n    ? {\n        runnerCmd: [emulatorPath, \"-cpu\", \"cortex-a53\"],\n        cpuDesc: \"Cortex-A53 (ARMv8.0-A+CRC, no LSE/SVE)\",","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/scripts/verify-baseline.ts#L44-L80","documentation":"Error \"--arch must be \"x64\" or \"aarch64\", got: ${targetArch}\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at scripts/verify-baseline.ts:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}