Skip to content
Permalink
Browse files

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.
  • Loading branch information...
xairy committed Mar 5, 2019
1 parent 5677e61 commit eb9e33b10f006149447e555a6afe12e2d6afc4f9
Showing with 6 additions and 0 deletions.
  1. +6 −0 tools/syz-execprog/execprog.go
@@ -303,6 +303,12 @@ func createConfig(target *prog.Target, entries []*prog.LogEntry,
execOpts.FaultCall = *flagFaultCall
execOpts.FaultNth = *flagFaultNth
}
for _, entry := range entries {
if entry.Fault {
config.Flags |= ipc.FlagEnableFault
break
}
}
handled := make(map[string]bool)
for _, entry := range entries {
for _, call := range entry.P.Calls {

0 comments on commit eb9e33b

Please sign in to comment.
You can’t perform that action at this time.