diff options
Diffstat (limited to 'src/runtime/mgc0.c')
| -rw-r--r-- | src/runtime/mgc0.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/mgc0.c b/src/runtime/mgc0.c index cba2beaa74..1b41bf9a79 100644 --- a/src/runtime/mgc0.c +++ b/src/runtime/mgc0.c @@ -330,7 +330,7 @@ scanblock(byte *b, uintptr n, byte *ptrmask) if(obj == nil) continue; if(obj < arena_start || obj >= arena_used) { - if((uintptr)obj < PhysPageSize) { + if((uintptr)obj < PhysPageSize && runtime·invalidptr) { s = nil; goto badobj; } @@ -375,7 +375,7 @@ scanblock(byte *b, uintptr n, byte *ptrmask) else runtime·printf(" span=%p-%p-%p state=%d\n", (uintptr)s->start<<PageShift, s->limit, (uintptr)(s->start+s->npages)<<PageShift, s->state); if(ptrmask != nil) - runtime·throw("bad pointer"); + runtime·throw("invalid heap pointer"); // Add to badblock list, which will cause the garbage collection // to keep repeating until it has traced the chain of pointers // leading to obj all the way back to a root. |
