# std.posix: panic on unexpected error in \`munmap\` · gitcafe/zig

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

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

Visibility: public

Requested revision: 923ddd94a1419abfa9ab95718a7b7d2a8da7a5ec

Requested commit: 923ddd94a1419abfa9ab95718a7b7d2a8da7a5ec

Commit: 923ddd94a1419abfa9ab95718a7b7d2a8da7a5ec

Tree: 588fd75889acd8f37b9da3bc7745561122ffdd68

Author: mlugg

Committer: mlugg

## Message

```
std.posix: panic on unexpected error in `munmap`

This is to help diagnose #25498. We can't use `unexpectedErrno` here,
because `std.posix.munmap` is infallible. So, when the flag is set to
report unexpected errnos, we just call `std.debug.panic` to provide
details instead of doing `unreachable`.

Pushing straight to master after running checks locally; there's no
point waiting for CI on the PR just for this.

```

## Parents

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

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