# builtin.zig: Do not overwrite error frames when trace full · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/a4523a2d4a0fb2b5c660a11aa37718080eebe9d0)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: a4523a2d4a0fb2b5c660a11aa37718080eebe9d0

Requested commit: a4523a2d4a0fb2b5c660a11aa37718080eebe9d0

Commit: a4523a2d4a0fb2b5c660a11aa37718080eebe9d0

Tree: 2d03ffade98f1d46db5af94eae7be40c998b93e7

Author: Cody Tapscott

Committer: Cody Tapscott

## Message

```
builtin.zig: Do not overwrite error frames when trace full

Previously, we'd overwrite the errors in a circular buffer. Now that
error return traces are intended to follow a stack discipline, we no
longer have to support the index rolling over. By treating the trace
like a saturating stack, any pop/restore code still behaves correctly
past-the-end of the trace.

As a bonus, this adds a small blurb to let the user know when the trace
saturated and x number of frames were dropped.

```

## Parents

- [d060cbbec75ac7b0204c706e4dfdfb38f1b24dfd](https://git.cafe/gitcafe/zig/commit/d060cbbec75ac7b0204c706e4dfdfb38f1b24dfd?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/a4523a2d4a0fb2b5c660a11aa37718080eebe9d0?format=markdown)
