mirror of
https://github.com/golang/go.git
synced 2025-10-31 16:50:58 +00:00
liblink, cmd/ld, runtime: remove stackguard1
Now that we've removed all the C code in runtime and the C compilers, there is no need to have a separate stackguard field to check for C code on Go stack. Remove field g.stackguard1 and rename g.stackguard0 to g.stackguard. Adjust liblink and cmd/ld as necessary. Change-Id: I54e75db5a93d783e86af5ff1a6cd497d669d8d33 Reviewed-on: https://go-review.googlesource.com/2144 Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
3b76b017ca
commit
ab0535ae3f
27 changed files with 72 additions and 192 deletions
|
|
@ -64,7 +64,7 @@ func mallocgc(size uintptr, typ *_type, flags uint32) unsafe.Pointer {
|
|||
}
|
||||
mp.mallocing = 1
|
||||
if mp.curg != nil {
|
||||
mp.curg.stackguard0 = ^uintptr(0xfff) | 0xbad
|
||||
mp.curg.stackguard = ^uintptr(0xfff) | 0xbad
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ func mallocgc(size uintptr, typ *_type, flags uint32) unsafe.Pointer {
|
|||
}
|
||||
mp.mallocing = 0
|
||||
if mp.curg != nil {
|
||||
mp.curg.stackguard0 = mp.curg.stack.lo + _StackGuard
|
||||
mp.curg.stackguard = mp.curg.stack.lo + _StackGuard
|
||||
}
|
||||
// Note: one releasem for the acquirem just above.
|
||||
// The other for the acquirem at start of malloc.
|
||||
|
|
@ -319,7 +319,7 @@ marked:
|
|||
}
|
||||
mp.mallocing = 0
|
||||
if mp.curg != nil {
|
||||
mp.curg.stackguard0 = mp.curg.stack.lo + _StackGuard
|
||||
mp.curg.stackguard = mp.curg.stack.lo + _StackGuard
|
||||
}
|
||||
// Note: one releasem for the acquirem just above.
|
||||
// The other for the acquirem at start of malloc.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue