{"record":{"id":"5b5775e06ff518bb","repo":"dotnet/runtime","slug":"no-jit-changes-found-starting-with-baseline-hash-5b5775","errorCode":null,"errorMessage":"No JIT changes found starting with baseline hash","messagePattern":"No JIT changes found starting with baseline hash","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/coreclr/scripts/superpmi.py","lineNumber":4913,"sourceCode":"            logging.info(\"Baseline hash: %s\", baseline_hash)\n        else:\n            baseline_hash = coreclr_args.base_git_hash\n\n        if coreclr_args.base_git_hash is None:\n            # Enumerate the last 20 changes, starting with the baseline, that included JIT and JIT-EE GUID changes.\n            command = [ \"git\", \"log\", \"--pretty=format:%H\", baseline_hash, \"-20\", \"--\", \"src/coreclr/jit/*\", \"src/coreclr/inc/jiteeversionguid.h\" ]\n            logging.debug(\"Invoking: %s\", \" \".join(command))\n            proc = subprocess.Popen(command, stdout=subprocess.PIPE)\n            stdout_change_list, _ = proc.communicate()\n            return_code = proc.returncode\n            change_list_hashes = []\n            if return_code == 0:\n                change_list_hashes = stdout_change_list.decode('utf-8').strip().splitlines()\n            else:\n                raise RuntimeError(\"Couldn't determine list of JIT changes starting with baseline hash\")\n\n            if len(change_list_hashes) == 0:\n                raise RuntimeError(\"No JIT changes found starting with baseline hash\")\n        else:\n            # If `-base_git_hash` is specified, then we use exactly that hash and no other for the baseline.\n            change_list_hashes = [ coreclr_args.base_git_hash ]\n\n        # For each hash, (1) see if we have the JIT already, and if not (2) try to download the corresponding JIT from the rolling build.\n\n        hashnum = 1\n        for git_hash in change_list_hashes:\n            logging.debug(\"%s: %s\", hashnum, git_hash)\n\n            jit_name = get_jit_name(coreclr_args)\n            basejit_dir = os.path.join(default_basejit_root_dir, \"{}.{}.{}.{}\".format(git_hash, coreclr_args.host_os, coreclr_args.arch, coreclr_args.build_type))\n            basejit_path = os.path.join(basejit_dir, jit_name)\n            if os.path.isfile(basejit_path):\n                # We found this baseline JIT in our cache; use it!\n                coreclr_args.base_jit_path = basejit_path\n                logging.info(\"Using baseline %s\", coreclr_args.base_jit_path)\n                return","sourceCodeStart":4895,"sourceCodeEnd":4931,"githubUrl":"https://github.com/dotnet/runtime/blob/60108ba66eb7d1d12f595480091b4ad80a24b172/src/coreclr/scripts/superpmi.py#L4895-L4931","documentation":"Raised by determine_base_jit when the 'git log' over the last 20 commits from the baseline touched no JIT source files, yielding an empty change list. With no candidate commits, there is nothing to download a baseline JIT from, so the function aborts. This is a data-condition failure rather than a git error: the command succeeded but returned zero lines.","triggerScenarios":"After git log returns code 0, stdout_change_list.decode().strip().splitlines() is empty (len == 0), so the RuntimeError fires. Happens when the last 20 commits from the baseline include none that modified src/coreclr/jit/* or jiteeversionguid.h, or when the baseline is at HEAD with no prior JIT changes in range.","commonSituations":"A branch where recent work is entirely outside the JIT (e.g. libraries/VM changes); the baseline_hash being very close to HEAD; a pathspec mismatch where JIT sources live elsewhere; an extremely fresh repo with fewer than 20 commits.","solutions":["Pass --base_git_hash <sha> pointing at a commit known to contain JIT changes so the candidate list is non-empty.","Verify the src/coreclr/jit pathspec is correct for your checkout layout.","If the baseline genuinely has no recent JIT changes, pick an older baseline commit that does, or supply --base_jit_path directly."],"exampleFix":"// before\nchange_list_hashes = stdout_change_list.decode('utf-8').strip().splitlines()\nif len(change_list_hashes) == 0:\n    raise RuntimeError(\"No JIT changes found starting with baseline hash\")\n// after (fix invocation)\npython superpmi.py asmdiff --base_git_hash <commit-with-jit-changes> ...","handlingStrategy":"validation","validationCode":"import subprocess\ndef ensure_jit_changes_exist(repo_location, baseline_hash):\n    cmd = ['git', '-C', repo_location, 'log', '--pretty=format:%H', baseline_hash, '-20', '--', 'src/coreclr/jit/*', 'src/coreclr/inc/jiteeversionguid.h']\n    out = subprocess.run(cmd, capture_output=True).stdout.decode('utf-8').strip().splitlines()\n    if len(out) == 0:\n        raise RuntimeError(f\"No JIT changes in last 20 commits from {baseline_hash}; pass --base_git_hash <commit-with-jit-changes>\")\n    return out","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Choose a baseline commit that includes JIT source changes.","Pass --base_git_hash explicitly when the auto-selected baseline has no JIT changes.","Alternatively supply --base_jit_path to bypass discovery entirely."],"tags":["git","base-jit","git-log","superpmi","asmdiff"],"backgroundTag":null,"analyzedSha":"60108ba66eb7d1d12f595480091b4ad80a24b172","analyzedAt":"2026-08-10T18:54:11.478Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}