From 75a7c5e2d1f09a4a58e7e1f1f4ef0b0f55a33413 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 19 Feb 2018 19:35:04 +0100 Subject: prog: rework address allocation 1. mmap all memory always, without explicit mmap calls in the program. This makes lots of things much easier and removes lots of code. Makes mmap not a special syscall and allows to fuzz without mmap enabled. 2. Change address assignment algorithm. Current algorithm allocates unmapped addresses too frequently and allows collisions between arguments of a single syscall. The new algorithm analyzes actual allocations in the program and places new arguments at unused locations. --- prog/minimization_test.go | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'prog/minimization_test.go') diff --git a/prog/minimization_test.go b/prog/minimization_test.go index 641b9a9b9..5979ce7a2 100644 --- a/prog/minimization_test.go +++ b/prog/minimization_test.go @@ -99,22 +99,6 @@ func TestMinimize(t *testing.T) { "sched_yield()\n", -1, }, - // Glue several mmaps together. - { - "sched_yield()\n" + - "mmap(&(0x7f0000010000/0x1000)=nil, 0x1000, 0x3, 0x32, 0xffffffffffffffff, 0x0)\n" + - "mmap(&(0x7f0000011000/0x1000)=nil, 0x1000, 0x3, 0x32, 0xffffffffffffffff, 0x0)\n" + - "getpid()\n" + - "mmap(&(0x7f0000015000/0x5000)=nil, 0x2000, 0x3, 0x32, 0xffffffffffffffff, 0x0)\n", - 3, - func(p *Prog, callIndex int) bool { - return p.String() == "mmap-sched_yield-getpid" - }, - "mmap(&(0x7f0000010000/0x7000)=nil, 0x7000, 0x0, 0x0, 0xffffffffffffffff, 0x0)\n" + - "sched_yield()\n" + - "getpid()\n", - 2, - }, } target, _, _ := initTest(t) for ti, test := range tests { -- cgit mrf-deployment