Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alternative to raises: [] #13

Open
planetis-m opened this issue Jun 8, 2021 · 1 comment
Open

alternative to raises: [] #13

planetis-m opened this issue Jun 8, 2021 · 1 comment

Comments

@planetis-m
Copy link
Owner

planetis-m commented Jun 8, 2021

proc initialize(): cint {.exportc: "LLVMFuzzerInitialize".} =
  {.emit: "N_CDECL(void, NimMain)(void); NimMain();".}

template testOneInput(body: untyped) =
  proc LLVMFuzzerTestOneInput(data {.inject.}: ptr UncheckedArray[byte], len {.inject.}: int): cint {.
      exportc.} =
    try:
      body
    finally: {.emit: "nimTestErrorFlag();".}

testOneInput:
  if true:
    raise newException(ValueError, "my my my")
@planetis-m
Copy link
Owner Author

Actually a bug nim-lang/Nim#18215

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant