# gpa: Fix GeneralPurposeAllocator double free stack traces · gitcafe/zig

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

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

Visibility: public

Requested revision: 762e2a4b52084beb41fb4a0d34d55f5a907db00a

Requested commit: 762e2a4b52084beb41fb4a0d34d55f5a907db00a

Commit: 762e2a4b52084beb41fb4a0d34d55f5a907db00a

Tree: 54c5d698e4dd1bf48a5992393d984ef534bd0b0c

Author: Hampus Fröjdholm

Committer: Hampus Fröjdholm

## Message

```
gpa: Fix GeneralPurposeAllocator double free stack traces

The wrong `size_class` was used when fetching stack traces from empty
buckets. The `size_class` would always be the maximum value after
exhausting the search of active buckets rather than the actual
`size_class` of the allocation.

```

## Parents

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

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