# Fix sentinel mismatch in llvm strings · gitcafe/zig

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

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

Visibility: public

Requested revision: 35c681b7b18df1f8679457975f9dcfc6a4a53468

Requested commit: 35c681b7b18df1f8679457975f9dcfc6a4a53468

Commit: 35c681b7b18df1f8679457975f9dcfc6a4a53468

Tree: 0a6826b835a11f0947ef67a9fd2004df6c8f0c7f

Author: Layne Gustafson

Committer: Andrew Kelley

## Message

```
Fix sentinel mismatch in llvm strings

Previously, buffers were used with toOwnedSlice() to create c strings
for LLVM cpu/feature strings. However, toOwnedSlice() shrinks the
string memory to the buffer's length, which cuts off the null terminator.
Now toSliceConst() is used instead, and the buffer is not deinited
so that the string memory is not freed.

```

## Parents

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

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