Skip to content

Corrupted stack traces #6975

@ghost

Description

nim --version

Nim Compiler Version 0.17.3 [Windows: amd64]
Copyright (c) 2006-2017 by Andreas Rumpf

git hash: e0e1241a54b8ad03ac45cdd56b845370a7e050f3
active boot switches: -d:release

Code (saved as bug2.nim) -

type
    A = ref object of RootObj
    R = ref object of Exception

proc add(): A =
    raise R()

proc p*(): seq[A] =
    result = @[]
    while true:
        try:
            result.add(add())
        except R:
            discard

discard p()
  1. nim c --run bug2.nim and then CTRL+C sometimes shows bug2 has stopped working , at other times gives -
SIGINT: Interrupted by Ctrl-C.
Traceback (most recent call last)
bug2.nim(16)             bug2
bug2.nim(12)             p
R:ObjectType(39772872)   �I���H�E�H��`]�UH��H��►H�M►H�U↑H�E►H�E��H��►]�UH��H��0H�M►H�U↑H�E►H�E�H�E�
SIGINT: Interrupted by Ctrl-C.
  1. koch temp c bug2.nim and then running bug2.exe from cmd and then CTRL+C sometimes gives -
Traceback (most recent call last)
bug2.nim(16)             bug2
bug2.nim(12)             p
bug2.nim(6)              add
rawAlloc(196608)         gc.nim
HïE°Hâ──`]├UHëσσHâ∞∞PHëM►Hì♣ôm☻(7076416) incRef
gc.nim(4457088)          HïE°Hâ──`]├UHëσσHâ∞∞`Hì♣∟n☻
SIGINT: Interrupted by Ctrl-C.

Note:
This is a random corruption. Some times the stack traces are proper.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions