Skip to content
Snippets Groups Projects
user avatar
Michael Anthony Knyszek authored
Currently there are a few sanity checks in the page allocator which
should fail immediately but because it's a check for a negative number
on a uint, it's actually dead-code.

If there's a bug in the page allocator which would cause the sanity
check to fail, this could cause memory corruption by returning an
invalid address (more precisely, one might either see a segfault, or
span overlap).

This change fixes these sanity checks to check the correct condition.

Fixes #38130.

Change-Id: Ia19786cece783d39f26df24dec8788833a6a3f21
Reviewed-on: https://go-review.googlesource.com/c/go/+/226297


Reviewed-by: default avatarGiovanni Bajo <rasky@develer.com>
Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
89e13c88
History
Name Last commit Last update