diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2026-02-13 13:57:22 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2026-02-13 15:23:36 +0000 |
| commit | 8d2e99b3e9f12885bfb0000ea51c7898c00a2ede (patch) | |
| tree | da7ad2863e1597318aeabf2d501dd7cfb925b51d /pkg | |
| parent | 843fb11999c2dcc016a5d0bd34237d9fd8bdeb74 (diff) | |
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.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/clangtool/clangtool.go | 2 |
1 files changed, 1 insertions, 1 deletions
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. |
