aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorXavier Bouchoux <xavierb@gmail.com>2022-10-15 16:58:29 +0200
committerVeikka Tuominen <git@vexu.eu>2022-10-18 13:03:22 +0200
commit23e212a9d0b5cfdff991a40ca264f9d1284f0d5f (patch)
treee53a70f813fb78130c7b5dfc08cef27f3b794aaf /src/Module.zig
parentbd0dd225e843801b4b6162cbd2709c7325ab87b7 (diff)
downloadzig-23e212a9d0b5cfdff991a40ca264f9d1284f0d5f.tar.gz
zig-23e212a9d0b5cfdff991a40ca264f9d1284f0d5f.zip
std: check for overflow in dumpStackTraceFromBase
same change as [68e26a2ceea85a1] "std: check for overflow in writeCurrentStackTrace" On arm64 macOS, the address of the last frame is 0x0 rather than a positive value like 0x1 on x86_64 macOS, therefore, we overflow an integer trying to subtract 1 when printing the stack trace. This patch fixes it by first checking for this condition before trying to subtract 1. Same behaviour on i386-windows-msvc. Note that we do not need to signal the `SignalIterator` about this as it will correctly detect this condition on the subsequent iteration and return `null`, thus terminating the loop.
Diffstat (limited to 'src/Module.zig')
0 files changed, 0 insertions, 0 deletions