# std.dwarf: handle DWARF 5 compile unit DW_AT_ranges correctly · gitcafe/zig

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

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

Visibility: public

Requested revision: 46e724ab28ba5934471d8b2dec60acdd7885d64b

Requested commit: 46e724ab28ba5934471d8b2dec60acdd7885d64b

Commit: 46e724ab28ba5934471d8b2dec60acdd7885d64b

Tree: aa4469c776d972e512c8bc046fc8c68dd4864abe

Author: mlugg

Committer: Andrew Kelley

## Message

```
std.dwarf: handle DWARF 5 compile unit DW_AT_ranges correctly

This data changed quite significantly between DWARF 4 and 5. Some
systems are shipping DWARF 5 libraries (Void Linux on musl libc seems to
use it for crt1 etc), which meant when printing stack traces, a random
compile unit might be incorrectly identified as containing an address,
resulting in incorrect location information.

I was consistently experiencing this issue with compiler stack traces,
and this change fixed it.

```

## Parents

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

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