{"record":{"id":"75e63171dac0a8a7","repo":"dotnet/runtime","slug":"unknown-host-os-75e631","errorCode":null,"errorMessage":"Unknown host os: {}","messagePattern":"Unknown host os: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/coreclr/scripts/superpmi.py","lineNumber":3760,"sourceCode":"    Args:\n        coreclr_args (CoreclrArguments) : parsed args\n\n    Returns:\n        coredistools_location (str)     : path of [lib]coredistools.dylib|so|dll\n    \"\"\"\n\n    if not hasattr(coreclr_args, \"core_root\") or coreclr_args.core_root is None:\n        raise RuntimeError(\"Core_Root not set properly\")\n\n    coredistools_dll_name = None\n    if coreclr_args.host_os.lower() == \"osx\":\n        coredistools_dll_name = \"libcoredistools.dylib\"\n    elif coreclr_args.host_os.lower() == \"linux\":\n        coredistools_dll_name = \"libcoredistools.so\"\n    elif coreclr_args.host_os.lower() == \"windows\":\n        coredistools_dll_name = \"coredistools.dll\"\n    else:\n        raise RuntimeError(\"Unknown host os: {}\".format(coreclr_args.host_os))\n\n    coredistools_location = os.path.join(coreclr_args.core_root, coredistools_dll_name)\n    if os.path.isfile(coredistools_location):\n        logging.info(\"Using coredistools found at %s\", coredistools_location)\n    else:\n        coredistools_r2rdump_location = os.path.join(coreclr_args.core_root, \"R2RDump\", coredistools_dll_name)\n        if os.path.isfile(coredistools_r2rdump_location):\n            logging.info(\"Using coredistools found at %s (copying to %s)\", coredistools_r2rdump_location, coredistools_location)\n            logging.debug(\"Copying %s -> %s\", coredistools_r2rdump_location, coredistools_location)\n            shutil.copy2(coredistools_r2rdump_location, coredistools_location)\n        else:\n            # Often, Core_Root will already exist. However, you can do a product build without\n            # creating a Core_Root, and successfully run replay or asm diffs, if we just create Core_Root\n            # and copy coredistools there. Note that our replays all depend on Core_Root existing, as we\n            # set the current directory to Core_Root before running superpmi.\n            if not os.path.isdir(coreclr_args.core_root):\n                logging.warning(\"Warning: Core_Root does not exist at \\\"%s\\\"; creating it now\", coreclr_args.core_root)\n                os.makedirs(coreclr_args.core_root)","sourceCodeStart":3742,"sourceCodeEnd":3778,"githubUrl":"https://github.com/dotnet/runtime/blob/290d5ab72cc1102813fbc0406fb186ceadabc340/src/coreclr/scripts/superpmi.py#L3742-L3778","documentation":"Raised in `determine_coredistools` (superpmi.py:3759-3760) when host_os is not one of osx/linux/windows. coredistools is only shipped/built for those three OSes (libcoredistools.dylib/so/coredistools.dll), so any other host_os value is unsupported and the function refuses to guess a filename.","triggerScenarios":"coreclr_args.host_os is set (explicitly or via deduction) to something like freebsd, illumos, solaris, haiku, browser, android, or wasi, and an asm-diff path triggers determine_coredistools. The OS switch in the function has no case for it.","commonSituations":"Cross-OS scenarios where target/host OS is a non-mainstream platform; an explicit `-target_os`/host override that leaks a value coredistools cannot satisfy; running on FreeBSD/Solaris where coredistools is not packaged.","solutions":["Run asm diffs on a supported host OS (linux, osx, or windows) where coredistools is available.","Do not force host_os to an unsupported value when you need asm diffs; leave it to auto-detection.","If you need diffs for a cross-target, collect on the supported host and replay/diff there."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"supported = {'osx', 'linux', 'windows'}\nif coreclr_args.host_os.lower() not in supported:\n    raise SystemExit(f'coredistools only available on {sorted(supported)}; got {coreclr_args.host_os}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run asm diffs on linux/osx/windows.","Do not override host_os to an unsupported platform for asm-diff flows."],"tags":["os","coredistools","config","superpmi"],"analyzedSha":"290d5ab72cc1102813fbc0406fb186ceadabc340","analyzedAt":"2026-08-06T19:57:01.276Z","schemaVersion":2},"datasetVersion":"2026-08-06T23:17:07.152Z"}