aboutsummaryrefslogtreecommitdiffstats
path: root/prog/mutation_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-03-17 17:13:26 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-03-17 21:19:13 +0100
commit97bc55cead011ec5d60af8c3696ee2724b78fea5 (patch)
treee59b94f9ea8d5631fdc1c3e16f5cb60b5b84cb33 /prog/mutation_test.go
parent61e9cc09afc5bf1afdd993a6863ba063b07f0bb2 (diff)
pkg/compiler: check that flags values fit into base type
flags[foo, int8] foo = 0x12345678 is always an error, detect these cases. Found some bugs in mptcp, packet sockets, kvm.
Diffstat (limited to 'prog/mutation_test.go')
-rw-r--r--prog/mutation_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/prog/mutation_test.go b/prog/mutation_test.go
index d4d3f6586..7708a286f 100644
--- a/prog/mutation_test.go
+++ b/prog/mutation_test.go
@@ -26,11 +26,11 @@ func TestMutationFlags(t *testing.T) {
// Mutate flags (bitmask = false).
{
`r0 = mutate_flags3(&(0x7f0000000000)="2e2f66696c653000", 0x0)`,
- `r0 = mutate_flags3(&(0x7f0000000000)="2e2f66696c653000", 0xddddddddeeeeeeee)`,
+ `r0 = mutate_flags3(&(0x7f0000000000)="2e2f66696c653000", 0xddddeeee)`,
},
{
- `r0 = mutate_flags3(&(0x7f0000000000)="2e2f66696c653000", 0xddddddddeeeeeeee)`,
- `r0 = mutate_flags3(&(0x7f0000000000)="2e2f66696c653000", 0xaaaaaaaaaaaaaaaa)`,
+ `r0 = mutate_flags3(&(0x7f0000000000)="2e2f66696c653000", 0xddddeeee)`,
+ `r0 = mutate_flags3(&(0x7f0000000000)="2e2f66696c653000", 0xaaaaaaaa)`,
},
}
runMutationTests(t, tests, true)
@@ -300,7 +300,7 @@ mutate0()
mutate6(r0, &(0x7f0000000000)="00", 0x1)
mutate1()
`, `
-r0 = mutate5(&(0x7f0000000000)="2e2f66696c653000", 0xcdcdcdcdcdcdcdcd)
+r0 = mutate5(&(0x7f0000000000)="2e2f66696c653000", 0xcdcdcdcd)
mutate0()
mutate6(r0, &(0x7f0000000000)="00", 0x1)
mutate1()