# Fix SIGSEGV handler for AArch64 Darwin targets · gitcafe/zig

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

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

Visibility: public

Requested revision: 518105471e145c90809fb2f5baa53cd08bde31aa

Requested commit: 518105471e145c90809fb2f5baa53cd08bde31aa

Commit: 518105471e145c90809fb2f5baa53cd08bde31aa

Tree: 8085d5407f5eead69a2af35e872e2afdde00181e

Author: Cezary Kupaj

Committer: GitHub

## Message

```
Fix SIGSEGV handler for AArch64 Darwin targets

* ucontext_t ptr is 8-byte aligned instead of 16-byte aligned which @alignCast() expects
* Retrieve pc address from ucontext_t since unwind_state is null
* Work around __mcontext_data being written incorrectly by the kernel
```

## Parents

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

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