[google/syzkaller] fd36da: tools/clang: compile clang tools into the binary

0 views
Skip to first unread message

Dmitry Vyukov

unread,
Feb 6, 2026, 4:29:59 AM (yesterday) Feb 6
to syzk...@googlegroups.com
Branch: refs/heads/gh-readonly-queue/master/pr-6775-f03c419189ef8ed823e306a342ee4d330fb2c394
Home: https://github.com/google/syzkaller
Commit: fd36daf55d7f9e8ab412fcbf0441658a8d8be727
https://github.com/google/syzkaller/commit/fd36daf55d7f9e8ab412fcbf0441658a8d8be727
Author: Dmitry Vyukov <dvy...@google.com>
Date: 2026-02-06 (Fri, 06 Feb 2026)

Changed paths:
M Makefile
M pkg/aflow/tool/codesearcher/codesearcher.go
M pkg/clangtool/clangtool.go
M pkg/clangtool/tooltest/tooltest.go
M pkg/codesearch/codesearch_test.go
A tools/clang/build.go
R tools/clang/codesearch/README.md
A tools/clang/codesearch/build.go
M tools/clang/codesearch/codesearch.cpp
A tools/clang/codesearch/codesearch.go
A tools/clang/declextract/build.go
M tools/clang/declextract/declextract.cpp
A tools/clang/declextract/declextract.go
M tools/clang/json.h
M tools/syz-codesearch/codesearch.go
M tools/syz-declextract/README.md
M tools/syz-declextract/declextract.go
M tools/syz-declextract/declextract_test.go

Log Message:
-----------
tools/clang: compile clang tools into the binary

Compiled clang tools into Go binaries using cgo.
This significantly simplifies building and deployment.
This also enables unit testing of clang tools.
Now raw go test for clang tools will build them, run,
and verify output.

Each clang tool is still started as a subprocess.
I've experimented with running them in-process,
but this makes stdout/stderr interception extremly complicated,
and it seems that clang tools still use unsynchronized global state,
which breaks when invoked multiple times.
Subprocesses also make it safer in the face of potential memory leaks,
or memory corruptions in clang tools.

Fixes #6645


Commit: 04f20e27d89a599725baf1048aba0db288c01153
https://github.com/google/syzkaller/commit/04f20e27d89a599725baf1048aba0db288c01153
Author: Dmitry Vyukov <dvy...@google.com>
Date: 2026-02-06 (Fri, 06 Feb 2026)

Changed paths:
M pkg/aflow/flow/assessment/kcsan.go
M pkg/aflow/flow/assessment/moderation.go
M pkg/aflow/flow/patching/patching.go
M pkg/aflow/tool/codesearcher/codesearcher.go
M syz-agent/agent.go

Log Message:
-----------
syz-agent: wipe codesearch binary

Now it's compiled into the syz-agent binary itself.


Compare: https://github.com/google/syzkaller/compare/fd36daf55d7f%5E...04f20e27d89a

To unsubscribe from these emails, change your notification settings at https://github.com/google/syzkaller/settings/notifications

Dmitry Vyukov

unread,
Feb 6, 2026, 4:41:19 AM (yesterday) Feb 6
to syzk...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages