diff --git a/drchaos.nimble b/drchaos.nimble index 2259aa8..498ea90 100644 --- a/drchaos.nimble +++ b/drchaos.nimble @@ -24,7 +24,7 @@ proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") = exec "nim " & lang & " --out:build/" & name & " " & extra_params & " " & srcDir & name & ".nim" proc test(name: string, srcDir = "tests/", args = "", lang = "c") = - buildBinary name, srcDir, "--mm:arc -d:danger" + buildBinary name, srcDir, "-d:release" # Should ideally run inside build/ because of the artifacts, but cd doesn't work! exec "build/" & name & " -max_total_time=3 -runs=10000" & args diff --git a/drchaos/mutator.nim b/drchaos/mutator.nim index b81dbf8..e1e56ee 100644 --- a/drchaos/mutator.nim +++ b/drchaos/mutator.nim @@ -515,8 +515,9 @@ template mutatorImpl(target, mutator, typ: untyped) = try: FuzzTarget(target)(getInput(x, data)) finally: - # Call Nim's compiler api to report unhandled exceptions. - {.emit: "nimTestErrorFlag();".} + when compileOption("exceptions", "goto"): + # Call Nim's compiler api to report unhandled exceptions. + {.emit: "nimTestErrorFlag();".} proc customMutatorImpl(x: var typ; data: openArray[byte]; maxLen: int; r: var Rand): int {.nosan.} =