diff options
author | tersec <tersec@users.noreply.github.com> | 2023-03-22 22:05:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-22 22:05:20 +0100 |
commit | e8a70ff1794e941a6930c3d240af16a708b59339 (patch) | |
tree | 509ea5209e75eba1d2bf063927c4d8233e319142 /lib | |
parent | d84b02f0e08bad3ddfa288e080e5ee485b58479e (diff) | |
download | Nim-e8a70ff1794e941a6930c3d240af16a708b59339.tar.gz |
don't access void* out of alignment in refc GC to avoid UB (#21560)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system/gc_common.nim | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/system/gc_common.nim b/lib/system/gc_common.nim index 54c51e783..eb0884560 100644 --- a/lib/system/gc_common.nim +++ b/lib/system/gc_common.nim @@ -391,7 +391,6 @@ else: let regEnd = sp +% sizeof(registers) while sp <% regEnd: gcMark(gch, cast[PPointer](sp)[]) - gcMark(gch, cast[PPointer](sp +% sizeof(pointer) div 2)[]) sp = sp +% sizeof(pointer) # Make sure sp is word-aligned sp = sp and not (sizeof(pointer) - 1) |