aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/syscall_descriptions_syntax.md1
-rw-r--r--prog/minimization.go3
-rw-r--r--prog/types.go1
3 files changed, 5 insertions, 0 deletions
diff --git a/docs/syscall_descriptions_syntax.md b/docs/syscall_descriptions_syntax.md
index cf490e5a7..1fe61343e 100644
--- a/docs/syscall_descriptions_syntax.md
+++ b/docs/syscall_descriptions_syntax.md
@@ -94,6 +94,7 @@ Call attributes are:
that don't return fixed error codes but rather something else (e.g. the current time).
"breaks_returns": ignore return values of all subsequent calls in the program in fallback feedback (can't be trusted).
"no_generate": do not try to generate this syscall, i.e. use only seed descriptions to produce it.
+"no_minimize": do not modify instances of this syscall when trying to minimize a crashing program.
```
## Ints
diff --git a/prog/minimization.go b/prog/minimization.go
index fcb681054..ee8f565c9 100644
--- a/prog/minimization.go
+++ b/prog/minimization.go
@@ -35,6 +35,9 @@ func Minimize(p0 *Prog, callIndex0 int, crash bool, pred0 func(*Prog, int) bool)
// Try to minimize individual calls.
for i := 0; i < len(p0.Calls); i++ {
+ if p0.Calls[i].Meta.Attrs.NoMinimize {
+ continue
+ }
ctx := &minimizeArgsCtx{
target: p0.Target,
p0: &p0,
diff --git a/prog/types.go b/prog/types.go
index a90c1d562..07eb54395 100644
--- a/prog/types.go
+++ b/prog/types.go
@@ -39,6 +39,7 @@ type SyscallAttrs struct {
IgnoreReturn bool
BreaksReturns bool
NoGenerate bool
+ NoMinimize bool
}
// MaxArgs is maximum number of syscall arguments.