dotnet/runtime · error · RuntimeError

Specified -base_jit_path does not point to a file

Error message

Specified -base_jit_path does not point to a file

What it means

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.

Solutions

  1. Verify with 'ls <base_jit_path>' that the path is the clrjit file itself (e.g. clrjit.dll / libclrjit.so / libclrjit.dylib).
  2. Ensure the baseline JIT matches the target arch/build_type/host_os.
  3. Omit --base_jit_path to let determine_base_jit auto-discover or download a baseline from the JIT rolling build.

Example fix

// before
if coreclr_args.base_jit_path is not None:
    if not os.path.isfile(coreclr_args.base_jit_path):
        raise RuntimeError("Specified -base_jit_path does not point to a file")
// after (fix invocation)
python superpmi.py asmdiff --base_jit_path /path/to/Core_Root/clrjit.dll ...
Defensive patterns

Strategy: validation

Validate before calling

import os
def validate_base_jit_path(base_jit_path):
    if base_jit_path is None:
        return None
    if not os.path.isfile(base_jit_path):
        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.")
    return os.path.abspath(base_jit_path)

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of dotnet/runtime@60108ba66e (2026-08-10). Data as JSON: /api/errors/71c3fe879ed51cab. Report an issue: GitHub.

Appendix: source

Thrown at src/coreclr/scripts/superpmi.py:4846

        5. Check if we've already downloaded a JIT that matches `base_git_hash`, and use that if available.
        6. Starting with `base_git_hash`, and possibly walking to older changes, look for matching builds
           in the JIT rolling build drops.
        7. If a baseline clrjit is found, download it to the `spmi/basejit/git-hash.os.architecture.build_type`
           cache directory.
        8. Set coreclr_args.base_jit_path to the full path to the downloaded baseline JIT.

    Args:
        coreclr_args (CoreclrArguments) : parsed args

    Returns:
        Nothing

        coreclr_args.base_jit_path is set to the path to the JIT to use for the baseline JIT.
    """

    if coreclr_args.base_jit_path is not None:
        if not os.path.isfile(coreclr_args.base_jit_path):
            raise RuntimeError("Specified -base_jit_path does not point to a file")
        coreclr_args.base_jit_path = os.path.abspath(coreclr_args.base_jit_path)
        return

    # We cache baseline jits under the following directory. Note that we can't create the full directory path
    # until we know the baseline JIT hash.
    default_basejit_root_dir = os.path.join(coreclr_args.spmi_location, "basejit")

    # Do all the remaining commands, including a number of 'git' commands including relative paths,
    # from the root of the runtime repo.

    with ChangeDir(coreclr_args.runtime_repo_location):
        if coreclr_args.git_hash is None:
            command = [ "git", "rev-parse", "HEAD" ]
            logging.debug("Invoking: %s", " ".join(command))
            proc = subprocess.Popen(command, stdout=subprocess.PIPE)
            stdout_git_rev_parse, _ = proc.communicate()
            return_code = proc.returncode
            if return_code == 0:

View on GitHub (pinned to 60108ba66e)