mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-18 03:24:00 +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 {
|
if b.state() == blockStateHead || b.state() == blockStateMark {
|
||||||
b++
|
b++
|
||||||
}
|
}
|
||||||
for b.state() == blockStateTail {
|
for b.address() < uintptr(metadataStart) && b.state() == blockStateTail {
|
||||||
b++
|
b++
|
||||||
}
|
}
|
||||||
return b
|
return b
|
||||||
|
|||||||
Reference in New Issue
Block a user