Skip to content

Commit eb9e33b

Browse files
committed
execprog: fix executing with fault injection
If the fault injection flags are not provided, but the log contains a fault injection like this: 2017/08/12 17:16:04 executing program 5 (fault-call:4 fault-nth:5): we fail to enable fault injection in ipc.Config. Fix it.
1 parent 5677e61 commit eb9e33b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/syz-execprog/execprog.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,12 @@ func createConfig(target *prog.Target, entries []*prog.LogEntry,
303303
execOpts.FaultCall = *flagFaultCall
304304
execOpts.FaultNth = *flagFaultNth
305305
}
306+
for _, entry := range entries {
307+
if entry.Fault {
308+
config.Flags |= ipc.FlagEnableFault
309+
break
310+
}
311+
}
306312
handled := make(map[string]bool)
307313
for _, entry := range entries {
308314
for _, call := range entry.P.Calls {

0 commit comments

Comments
 (0)