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

Regression: compiler stack overflow in transformIteratorBody/lowerStmtListExprs #8851

Closed
zielmicha opened this issue Sep 3, 2018 · 4 comments

Comments

@zielmicha
Copy link
Contributor

Current devel (d06da9c) compiler crashes with stack overflow on reactor/redis.nim from https://github.com/zielmicha/reactor.nim (ba98bb8845a79d). Release 0.18.0 and even cc5140d compiles the code without a problem.

Unfortunately I don't know yet how to create a minimal example - the code makes heavy use of reactor.nim async macro.

@zielmicha
Copy link
Contributor Author

When I change this:

proc connectProc(client: RedisClient, host: string, port: int, password: string) {.async.} =
  client.pipe = await connectTcp(host, port)
  if password != "":
    await client.auth(password)

to

proc connectProc(client: RedisClient, host: string, port: int, password: string) {.async.} =
  let x = await connectTcp(host, port)
  client.pipe = x
  if password != "":
    await client.auth(password)

it starts to work.

I still can't produce smaller example (obvious one works).

@Araq
Copy link
Member

Araq commented Sep 3, 2018

Excellent you reported this before we got 0.19 out. :-)

@yglukhov
Copy link
Member

yglukhov commented Sep 3, 2018

@zielmicha I'm getting another problem:

async/stream.nim(151, 32) Error: type mismatch: got <Buffer>
but expected one of:
proc unsafeInitView[T](data: var seq[T]): View[T]
proc unsafeInitView[T; R: ref](data: ptr T; len: int; gcKeep: R): View[T]
proc unsafeInitView(data: var string): View[char]
proc unsafeInitView[T](data: ptr T; len: int): View[T]

expression: unsafeInitView(data)

@yglukhov
Copy link
Member

yglukhov commented Sep 3, 2018

nevermind, fix on its way

yglukhov added a commit to yglukhov/Nim that referenced this issue Sep 3, 2018
yglukhov added a commit to yglukhov/Nim that referenced this issue Sep 3, 2018
@Araq Araq closed this as completed in d2eea9e Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants