diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2025-08-27 21:35:45 +0100 |
|---|---|---|
| committer | Matthew Lugg <mlugg@mlugg.co.uk> | 2025-08-28 10:56:11 +0100 |
| commit | a31950aa578824e0933b49109f6ac55c84979b6d (patch) | |
| tree | f704452b38410eb4ec1f1dc7139a6807c9ffc767 /src/codegen/c | |
| parent | 151c7dc74b97d2552637af526cf56390586386a6 (diff) | |
| download | zig-a31950aa578824e0933b49109f6ac55c84979b6d.tar.gz zig-a31950aa578824e0933b49109f6ac55c84979b6d.zip | |
std.debug: remove `@frameAddress()` "UAF"
We can't call `@frameAddress()` and then immediately `return`! That
invalidates the frame. This *usually* isn't a problem, because the stack
walk `next` call will *probably* have a stack frame and it will
*probably* be at the exact same address, but neither of those is a
guarantee. On powerpc, presumably some unfortunate inlining was going
on, so this frame was indeed invalidated when we started walking frames.
We need to explicitly pass `@frameAddress` into any function which will
return before we actually walk the stack. Pretty simple patch.
Resolves: #24970
Diffstat (limited to 'src/codegen/c')
0 files changed, 0 insertions, 0 deletions
