mirror of
https://github.com/golang/go
synced 2024-11-22 15:24:42 -07:00
bytes: don't leave mprotect-ed pages after unsafe test.
Fixes inscrutable GC faults during testing. R=golang-dev, bradfitz, dave, fullung CC=golang-dev https://golang.org/cl/8300044
This commit is contained in:
parent
2ba6ecb3e2
commit
e42584effe
@ -30,6 +30,8 @@ func TestEqualNearPageBoundary(t *testing.T) {
|
||||
}
|
||||
syscall.Mprotect(b[i-pagesize:i], 0)
|
||||
syscall.Mprotect(b[i+pagesize:i+2*pagesize], 0)
|
||||
defer syscall.Mprotect(b[i-pagesize:i], syscall.PROT_READ|syscall.PROT_WRITE)
|
||||
defer syscall.Mprotect(b[i+pagesize:i+2*pagesize], syscall.PROT_READ|syscall.PROT_WRITE)
|
||||
|
||||
// both of these should fault
|
||||
//pagesize += int(b[i-1])
|
||||
|
Loading…
Reference in New Issue
Block a user