mirror of https://github.com/status-im/nim-eth.git
Fix aflLoop for non afl-clang-fast
This commit is contained in:
parent
f1604ca929
commit
4b154e56c7
|
@ -88,7 +88,10 @@ when defined(clangfast):
|
||||||
## Test case should be able to handle repeated inputs. No repeated fork() will
|
## Test case should be able to handle repeated inputs. No repeated fork() will
|
||||||
## be done.
|
## be done.
|
||||||
# TODO: Lets use this in the test block when afl-clang-fast is used?
|
# TODO: Lets use this in the test block when afl-clang-fast is used?
|
||||||
proc aflLoop*(count: cuint): cint {.importc: "__AFL_LOOP", noDecl.}
|
proc aflLoopImpl(count: cuint): cint {.importc: "__AFL_LOOP", noDecl.}
|
||||||
|
template aflLoop*(body: untyped): untyped =
|
||||||
|
while aflLoopImpl(1000) != 0:
|
||||||
|
`body`
|
||||||
else:
|
else:
|
||||||
proc aflInit*() = discard
|
proc aflInit*() = discard
|
||||||
proc aflLoop*(count: cuint): cint = 0
|
template aflLoop*(body: untyped): untyped = `body`
|
||||||
|
|
Loading…
Reference in New Issue