# std.os.linux: Add unwinding protection in clone\(\) implementations\. · gitcafe/zig

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

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

Visibility: public

Requested revision: da018f972619377e8c044c5c27ebf231be262bb3

Requested commit: da018f972619377e8c044c5c27ebf231be262bb3

Commit: da018f972619377e8c044c5c27ebf231be262bb3

Tree: 00faa647aca74f648677b74828301ab0f8c14fc0

Author: Alex Rønne Petersen

Committer: Alex Rønne Petersen

## Message

```
std.os.linux: Add unwinding protection in clone() implementations.

Whatever was in the frame pointer register prior to clone() will no longer be
valid in the child process, so zero it to protect FP-based unwinders. Similarly,
mark the link register as undefined to protect DWARF-based unwinders.

This is only zeroing the frame pointer(s) on Arm/Thumb because of an LLVM
assembler bug: https://github.com/llvm/llvm-project/issues/115891

```

## Parents

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

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