Files
Nim/lib
ringabout feaa364038 fixes #25306; Dangling pointers in stack traces with -d:nimStackTraceOverride (#25313)
fixes #25306

```nim
type
  StackTraceEntry* = object ## In debug mode exceptions store the stack trace that led
                            ## to them. A `StackTraceEntry` is a single entry of the
                            ## stack trace.
    procname*: cstring      ## Name of the proc that is currently executing.
    line*: int              ## Line number of the proc that is currently executing.
    filename*: cstring      ## Filename of the proc that is currently executing.
    when NimStackTraceMsgs:
      frameMsg*: string     ## When a stacktrace is generated in a given frame and
                            ## rendered at a later time, we should ensure the stacktrace
                            ## data isn't invalidated; any pointer into PFrame is
                            ## subject to being invalidated so shouldn't be stored.
    when defined(nimStackTraceOverride):
      programCounter*: uint ## Program counter - will be used to get the rest of the info,
                            ## when `$` is called on this type. We can't use
                            ## "cuintptr_t" in here.
      procnameStr*, filenameStr*: string ## GC-ed alternatives to "procname" and "filename"
```

(cherry picked from commit 0ea5f2625c)
2025-12-05 15:29:35 +01:00
..
2017-02-20 17:24:19 +02:00
2013-03-16 23:53:07 +01:00
2021-06-03 14:00:53 +02:00