# stage2: Fix UAF in ErrorMsg destructor · gitcafe/zig

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

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

Visibility: public

Requested revision: 18b46485bcb6ad6b4be31c87659ffd78a311c904

Requested commit: 18b46485bcb6ad6b4be31c87659ffd78a311c904

Commit: 18b46485bcb6ad6b4be31c87659ffd78a311c904

Tree: 8d62c1a25260a1833f82b77ec82e8d454531408a

Author: LemonBoy

Committer: Andrew Kelley

## Message

```
stage2: Fix UAF in ErrorMsg destructor

After calling gpa.destroy the object is gone for good, setting the
contents to undefined is a bug and may crash the compiler.

```

## Parents

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

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