{"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/60108ba66eb7d1d12f595480091b4ad80a24b172/src/coreclr/scripts/superpmi.py#L4828-L4864","documentation":"Raised by determine_base_jit when the user passes --base_jit_path but os.path.isfile reports it is not a regular file. The base JIT is the baseline clrjit used for the 'before' side of an asm/perf diff; an explicit path is trusted as-is, so pointing it at a directory or nonexistent file aborts immediately before any git/download fallback.","triggerScenarios":"Called at the start of determine_base_jit: if coreclr_args.base_jit_path is not None and os.path.isfile(coreclr_args.base_jit_path) is False, it raises. Occurs when the path is a directory, a typo, a stale path, or the clrjit file was not built/copied there.","commonSituations":"Pointing --base_jit_path at the Core_Root directory instead of the clrjit.dll file inside it; passing a path from a different arch/build_type; the baseline JIT not yet built or copied.","solutions":["Verify with 'ls <base_jit_path>' that the path is the clrjit file itself (e.g. clrjit.dll / libclrjit.so / libclrjit.dylib).","Ensure the baseline JIT matches the target arch/build_type/host_os.","Omit --base_jit_path to let determine_base_jit auto-discover or download a baseline from the JIT rolling build."],"exampleFix":"// before\nif 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// after (fix invocation)\npython superpmi.py asmdiff --base_jit_path /path/to/Core_Root/clrjit.dll ...","handlingStrategy":"validation","validationCode":"import os\ndef validate_base_jit_path(base_jit_path):\n    if base_jit_path is None:\n        return None\n    if not os.path.isfile(base_jit_path):\n        raise RuntimeError(f\"--base_jit_path is not a file: {base_jit_path}. Point at the clrjit file itself, or omit the flag for auto-discovery.\")\n    return os.path.abspath(base_jit_path)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Point --base_jit_path at the clrjit file, not its directory.","Ensure the baseline JIT matches the target arch/build_type/host_os.","Omit the flag to let determine_base_jit auto-discover or download."],"tags":["base-jit","configuration","path","asmdiff","superpmi"],"backgroundTag":null,"analyzedSha":"60108ba66eb7d1d12f595480091b4ad80a24b172","analyzedAt":"2026-08-10T18:54:11.478Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}