diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-13 12:37:34 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-13 12:37:34 -0800 |
commit | d1f37af9792b048f7ef98140d067ba129a97c565 (patch) | |
tree | 840bf755de2b5530e392d13d15918ceec9978eaa /src/relooper/fuzzer.py | |
parent | ec3eba770983ad300ca958db5764206924452b0b (diff) |
allow relooper to manager its own output buffer, to avoid fixed output limits1.8.7
Diffstat (limited to 'src/relooper/fuzzer.py')
-rw-r--r-- | src/relooper/fuzzer.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/relooper/fuzzer.py b/src/relooper/fuzzer.py index fa47583e..18db997e 100644 --- a/src/relooper/fuzzer.py +++ b/src/relooper/fuzzer.py @@ -47,8 +47,18 @@ while(1) switch(label) { int main() { char *buffer = (char*)malloc(10*1024*1024); +''' + + if random.randint(0, 1) == 0: + make = False + fast += ''' Relooper::SetOutputBuffer(buffer, 10*1024*1024); ''' + else: + make = True + fast += ''' + Relooper::MakeOutputBuffer(%d); +''' % random.randint(1, 1024*1024*10) for i in range(1, num): slow += ' case %d: print(%d); state = check(); modded = state %% %d\n' % (i, i, len(branches[i])+1) @@ -102,11 +112,11 @@ int main() { printf("\\n\\n"); r.Render(); - puts(buffer); + puts(%s); return 1; } -''' +''' % ('buffer' if not make else 'Relooper::GetOutputBuffer()') slow += '}' |