{"record":{"id":"fa87318b739119d8","repo":"wasmerio/wasmer","slug":"the-lldb-profiler-requires-experimental-artifact","errorCode":null,"errorMessage":"The lldb profiler requires --experimental-artifact","messagePattern":"The lldb profiler requires --experimental-artifact","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"lib/cli/src/backend.rs","lineNumber":230,"sourceCode":"            \"gdb\" => Ok(Self::Gdb),\n            \"lldb\" => Ok(Self::Lldb),\n            _ => Err(anyhow::anyhow!(\"Unrecognized profiler: {s}\")),\n        }\n    }\n}\n\nimpl RuntimeOptions {\n    fn validate_profiler(&self) -> Result<()> {\n        if self.experimental_artifact && !cfg!(target_os = \"linux\") {\n            bail!(\"--experimental-artifact is only supported on Linux\");\n        }\n        if !self.experimental_artifact {\n            match self.profiler {\n                Some(Profiler::Gdb) => {\n                    bail!(\"The gdb profiler requires --experimental-artifact\")\n                }\n                Some(Profiler::Lldb) => {\n                    bail!(\"The lldb profiler requires --experimental-artifact\")\n                }\n                _ => {}\n            }\n        }\n        Ok(())\n    }\n\n    pub fn get_available_backends(&self) -> Result<Vec<BackendType>> {\n        // If a specific backend is explicitly requested, use it\n        #[cfg(feature = \"cranelift\")]\n        {\n            if self.cranelift {\n                return Ok(vec![BackendType::Cranelift]);\n            }\n        }\n\n        #[cfg(feature = \"llvm\")]\n        {","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/cli/src/backend.rs#L212-L248","documentation":"Same contract as the gdb profiler: the lldb profiler requires the experimental artifact instrumentation to attach. validate_profiler bails when Profiler::Lldb is selected while experimental_artifact is false.","triggerScenarios":"Passing Profiler::Lldb (or --profile lldb) without --experimental-artifact, when get_sys_compiler_config/get_engine builds the engine.","commonSituations":"Running `wasmer run --profile lldb` without the experimental flag; CI profiling jobs missing the flag; enabling lldb profiling in a config file without the counterpart setting.","solutions":["Add --experimental-artifact alongside --profile lldb","Set RuntimeOptions.experimental_artifact = true when selecting Profiler::Lldb","Remove the lldb profiler option if profiling is not intended"],"exampleFix":"// before\nlet opts = RuntimeOptions { profiler: Some(Profiler::Lldb), experimental_artifact: false, .. };\n// after\nlet opts = RuntimeOptions { profiler: Some(Profiler::Lldb), experimental_artifact: true, .. };","handlingStrategy":"validation","validationCode":"if matches!(opts.profiler, Some(Profiler::Lldb)) && !opts.experimental_artifact {\n    eprintln!(\"lldb profiler needs --experimental-artifact; enabling\");\n    opts.experimental_artifact = true;\n}","typeGuard":"fn profiler_config_valid(opts: &RuntimeOptions) -> bool {\n    !matches!(opts.profiler, Some(Profiler::Gdb | Profiler::Lldb)) || opts.experimental_artifact\n}","tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"requires --experimental-artifact\") => retry_with_artifact_flag(),\n    other => other?,\n}","preventionTips":["Always pair --profile lldb with --experimental-artifact","Centralize profiler flag construction in one helper","Add flag-combination checks to CI profiling jobs"],"tags":["cli","profiler","lldb","flags","config"],"backgroundTag":"profiler-requires-flag","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}