From d8e6f911090ec0020f34e094005284b5c8ac1e7f Mon Sep 17 00:00:00 2001 From: Space Meyer Date: Sat, 30 Jul 2022 12:16:05 +0000 Subject: pkg/bisect: support clang for crash bisection Before we hardcoded bisection to use gcc, now the compiler family can be configured in the bisection config. --- tools/syz-bisect/bisect.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tools/syz-bisect') diff --git a/tools/syz-bisect/bisect.go b/tools/syz-bisect/bisect.go index 1c8692700..9712ddcd3 100644 --- a/tools/syz-bisect/bisect.go +++ b/tools/syz-bisect/bisect.go @@ -43,10 +43,12 @@ var ( ) type Config struct { + // Currently either 'gcc' or 'clang'. Note that pkg/bisect requires + // explicit plumbing for every os/compiler combination. + BisectCompiler string `json:"bisect_compiler"` // BinDir must point to a dir that contains compilers required to build // older versions of the kernel. For linux, it needs to include several - // gcc versions. A working archive can be downloaded from: - // https://storage.googleapis.com/syzkaller/bisect_bin.tar.gz + // compiler versions. BinDir string `json:"bin_dir"` Ccache string `json:"ccache"` KernelRepo string `json:"kernel_repo"` @@ -94,9 +96,10 @@ func main() { TraceWriter: os.Stdout, OutDir: *flagCrash, }, - Fix: *flagFix, - BinDir: mycfg.BinDir, - Ccache: mycfg.Ccache, + Fix: *flagFix, + BisectCompiler: mycfg.BisectCompiler, + BinDir: mycfg.BinDir, + Ccache: mycfg.Ccache, Kernel: bisect.KernelConfig{ Repo: mycfg.KernelRepo, Branch: mycfg.KernelBranch, -- cgit mrf-deployment