diff options
| author | Austin Clements <austin@google.com> | 2016-06-17 11:07:56 -0400 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2016-06-17 15:18:39 +0000 |
| commit | 9e8fa1e99c2003cee53a6630aea9d8a3627492ab (patch) | |
| tree | 75c9c834bb67f8196533281977a83b07fce60ad0 /src/runtime/stack.go | |
| parent | fca9fc52c831ab6af56e30f8c48062a99ded2580 (diff) | |
| download | go-9e8fa1e99c2003cee53a6630aea9d8a3627492ab.tar.xz | |
runtime: eliminate poisonStack checks
We haven't used poisonStack since we switched to 1-bit stack maps
(4d0f3a1), but the checks are still there. However, nothing prevents
us from genuinely allocating an object at this address on 32-bit and
causing the runtime to crash claiming that it's found a bad pointer.
Since we're not using poisonStack anyway, just pull it out.
Fixes #15831.
Change-Id: Ia6ef604675b8433f75045e369f5acd4644a5bb38
Reviewed-on: https://go-review.googlesource.com/24211
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/stack.go')
| -rw-r--r-- | src/runtime/stack.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/runtime/stack.go b/src/runtime/stack.go index ee2797e144..b14b4005d8 100644 --- a/src/runtime/stack.go +++ b/src/runtime/stack.go @@ -127,7 +127,6 @@ const ( const ( uintptrMask = 1<<(8*sys.PtrSize) - 1 - poisonStack = uintptrMask & 0x6868686868686868 // Goroutine preemption request. // Stored into g->stackguard0 to cause split stack check failure. @@ -594,7 +593,7 @@ func adjustpointers(scanp unsafe.Pointer, cbv *bitvector, adjinfo *adjustinfo, f pp := (*uintptr)(add(scanp, i*sys.PtrSize)) retry: p := *pp - if f != nil && 0 < p && p < _PageSize && debug.invalidptr != 0 || p == poisonStack { + if f != nil && 0 < p && p < _PageSize && debug.invalidptr != 0 { // Looks like a junk value in a pointer slot. // Live analysis wrong? getg().m.traceback = 2 |
