jester icon indicating copy to clipboard operation
jester copied to clipboard

Runtime SIGBUS:

Open ynfle opened this issue 2 years ago • 1 comments

import jester

const cookies = {
  "a": "a",
  "b": "b",
  "c": "c",
  "d": "d",
  "e": "e",
  "f": "f"
}.toTable

proc myrouter(request: Request): Future[ResponseData] {.async.} =
  block route:
    for name, cookie in cookies:
      setCookie(name, cookie)
    resp Http200

var j = initJester myrouter
j.serve

fails at runtime when the endpoint is hit with SIGBUS: Illegal storage access. (Attempt to read from nil?)

This is only with the refc gc, but linux and Windows don't have the crash with orc. macOS still crashes, though

ynfle avatar Nov 29 '22 08:11 ynfle

I actually have that same error with orc. It works occasionally, just a timing issue, I have to spam execute the server executable until it works. There is some conversation about it here as well:

https://forum.nim-lang.org/t/9767

ArikRahman avatar Dec 29 '22 01:12 ArikRahman