From 8d2e99b3e9f12885bfb0000ea51c7898c00a2ede Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 13 Feb 2026 13:57:22 +0100 Subject: pkg/clangtool: fix exec of clang tools Use absolute path to clang tools. If syz-agent is started as "./syz-agent", then the relative path won't work, since we also change CWD for the binary. --- pkg/clangtool/clangtool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/clangtool/clangtool.go b/pkg/clangtool/clangtool.go index c0c834e2d..fe4baf524 100644 --- a/pkg/clangtool/clangtool.go +++ b/pkg/clangtool/clangtool.go @@ -160,7 +160,7 @@ func runTool[Output any, OutputPtr OutputDataPtr[Output]](cfg *Config, dbFile, f // version that produces more warnings. // Comments are needed for codesearch tool, but may be useful for declextract // in the future if we try to parse them with LLMs. - cmd := exec.Command(os.Args[0], "-p", dbFile, + cmd := exec.Command(osutil.Abs(os.Args[0]), "-p", dbFile, "--extra-arg=-w", "--extra-arg=-fparse-all-comments", file) cmd.Dir = cfg.KernelObj // This tells the C++ clang tool to execute in a constructor. -- cgit mrf-deployment