aboutsummaryrefslogtreecommitdiffstats
path: root/prog/minimization_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-07-12 12:40:30 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-07-12 12:40:30 +0200
commit06c33b3af0ff4072fb002879f83077c9d162a224 (patch)
tree50ff54e3ee901980be2cf41914a7d95a7dc26458 /prog/minimization_test.go
parent3986ce95fde3d4b5bccef19b537da090021046fc (diff)
prog: sanitize calls after hints mutation
Hints mutation could produce unsanitized calls. Sanitize calls after hints mutation. Also sanitize on load (in validate), because bad programs can already be in corpuses. And it's just the right thing to do because sanitization rules can change over time.
Diffstat (limited to 'prog/minimization_test.go')
-rw-r--r--prog/minimization_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/prog/minimization_test.go b/prog/minimization_test.go
index 9cedb940f..d41663e70 100644
--- a/prog/minimization_test.go
+++ b/prog/minimization_test.go
@@ -46,7 +46,7 @@ func TestMinimize(t *testing.T) {
// Aim at removal of sched_yield.
return len(p.Calls) == 2 && p.Calls[0].Meta.Name == "mmap" && p.Calls[1].Meta.Name == "pipe2"
},
- "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x0, 0x0, 0xffffffffffffffff, 0x0)\n" +
+ "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x0, 0x10, 0xffffffffffffffff, 0x0)\n" +
"pipe2(&(0x7f0000000000), 0x0)\n",
1,
},
@@ -79,7 +79,7 @@ func TestMinimize(t *testing.T) {
func(p *Prog, callIndex int) bool {
return p.String() == "mmap-write-sched_yield"
},
- "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x0, 0x0, 0xffffffffffffffff, 0x0)\n" +
+ "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x0, 0x10, 0xffffffffffffffff, 0x0)\n" +
"write(0xffffffffffffffff, &(0x7f0000000000), 0x0)\n" +
"sched_yield()\n",
2,
@@ -94,7 +94,7 @@ func TestMinimize(t *testing.T) {
func(p *Prog, callIndex int) bool {
return p.String() == "mmap-write-sched_yield"
},
- "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x0, 0x0, 0xffffffffffffffff, 0x0)\n" +
+ "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x0, 0x10, 0xffffffffffffffff, 0x0)\n" +
"write(0xffffffffffffffff, &(0x7f0000000000), 0x0)\n" +
"sched_yield()\n",
-1,