Skip to content

Commit 8783332

Browse files
committed
fix off-by-one error in generic memory scanner for the list GC
1 parent 1915a82 commit 8783332

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/gc_list_generic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import "unsafe"
88
func markMem(start, end uintptr) {
99
start = align(start)
1010
end &^= unsafe.Alignof(unsafe.Pointer(nil)) - 1
11-
for ; start < end; start += unsafe.Alignof(unsafe.Pointer(nil)) - 1 {
11+
for ; start < end; start += unsafe.Alignof(unsafe.Pointer(nil)) {
1212
markAddr(*(*uintptr)(unsafe.Pointer(start)))
1313
}
1414
}

0 commit comments

Comments
 (0)