{"record":{"id":"71c3fe879ed51cab","repo":"dotnet/runtime","slug":"specified-base-jit-path-does-not-point-to-a-file","errorCode":null,"errorMessage":"Specified -base_jit_path does not point to a file","messagePattern":"Specified -base_jit_path does not point to a file","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/coreclr/scripts/superpmi.py","lineNumber":4846,"sourceCode":"        5. Check if we've already downloaded a JIT that matches `base_git_hash`, and use that if available.\n        6. Starting with `base_git_hash`, and possibly walking to older changes, look for matching builds\n           in the JIT rolling build drops.\n        7. If a baseline clrjit is found, download it to the `spmi/basejit/git-hash.os.architecture.build_type`\n           cache directory.\n        8. Set coreclr_args.base_jit_path to the full path to the downloaded baseline JIT.\n\n    Args:\n        coreclr_args (CoreclrArguments) : parsed args\n\n    Returns:\n        Nothing\n\n        coreclr_args.base_jit_path is set to the path to the JIT to use for the baseline JIT.\n    \"\"\"\n\n    if coreclr_args.base_jit_path is not None:\n        if not os.path.isfile(coreclr_args.base_jit_path):\n            raise RuntimeError(\"Specified -base_jit_path does not point to a file\")\n        coreclr_args.base_jit_path = os.path.abspath(coreclr_args.base_jit_path)\n        return\n\n    # We cache baseline jits under the following directory. Note that we can't create the full directory path\n    # until we know the baseline JIT hash.\n    default_basejit_root_dir = os.path.join(coreclr_args.spmi_location, \"basejit\")\n\n    # Do all the remaining commands, including a number of 'git' commands including relative paths,\n    # from the root of the runtime repo.\n\n    with ChangeDir(coreclr_args.runtime_repo_location):\n        if coreclr_args.git_hash is None:\n            command = [ \"git\", \"rev-parse\", \"HEAD\" ]\n            logging.debug(\"Invoking: %s\", \" \".join(command))\n            proc = subprocess.Popen(command, stdout=subprocess.PIPE)\n            stdout_git_rev_parse, _ = proc.communicate()\n            return_code = proc.returncode\n            if return_code == 0:","sourceCodeStart":4828,"sourceCodeEnd":4864,"githubUrl":"https://github.com/dotnet/runtime/blob/290d5ab72cc1102813fbc0406fb186ceadabc340/src/coreclr/scripts/superpmi.py#L4828-L4864","documentation":"Raised in the baseline-JIT resolver (superpmi.py:4844-4846) when `-base_jit_path` is supplied but does not point to an existing file. When the user explicitly provides a baseline clrjit, the script validates the path is a real file rather than searching/downloading a default baseline JIT.","triggerScenarios":"Passing `-base_jit_path <path>` to asmdiffs/tpdiff/metricdiff where the path is not a file. The os.path.isfile check fires before absolutizing the path and returning.","commonSituations":"Typo or stale path to a clrjit.dll from a removed build; relative path resolving under the wrong cwd; pointing at a directory or to a build product that wasn't emitted; arch/build mismatch so the file lives elsewhere.","solutions":["Verify the path exists (`ls <path>`) and use an absolute path to the baseline clrjit.","Drop `-base_jit_path` to let the script compute and download the baseline JIT from the rolling build by git hash.","Rebuild the baseline runtime so the clrjit file exists at the expected location."],"exampleFix":"// before\nsuperpmi.py asmdiffs -base_jit_path ./old/clrjit.dll -mch_files foo.mch ...\n// after\nsuperpmi.py asmdiffs -base_jit_path /abs/path/to/base/artifacts/bin/coreclr/<os>.<arch>.Release/clrjit.dll -mch_files foo.mch ...","handlingStrategy":"validation","validationCode":"import os\nif args.base_jit_path is not None:\n    p = os.path.abspath(args.base_jit_path)\n    if not os.path.isfile(p):\n        raise SystemExit(f'-base_jit_path {p} is not a file; omit it to auto-resolve a baseline clrjit')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use absolute paths for -base_jit_path.","Omit -base_jit_path to let the script compute/download a baseline JIT."],"tags":["config","args","asmdiffs","superpmi"],"analyzedSha":"290d5ab72cc1102813fbc0406fb186ceadabc340","analyzedAt":"2026-08-06T19:57:01.276Z","schemaVersion":2},"datasetVersion":"2026-08-06T23:17:07.152Z"}