mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 19:43:44 +00:00
src/runtime: prevent out-of-bounds memory access during b.state()
This commit is contained in:
@@ -134,7 +134,7 @@ func (b gcBlock) findNext() gcBlock {
|
||||
if b.state() == blockStateHead || b.state() == blockStateMark {
|
||||
b++
|
||||
}
|
||||
for b.state() == blockStateTail {
|
||||
for b.address() < uintptr(metadataStart) && b.state() == blockStateTail {
|
||||
b++
|
||||
}
|
||||
return b
|
||||
|
||||
Reference in New Issue
Block a user