mirror of
				https://github.com/golang/go.git
				synced 2025-10-31 16:50:58 +00:00 
			
		
		
		
	Revert "liblink, cmd/ld, runtime: remove stackguard1"
This reverts commit ab0535ae3f.
I think it will remain useful to distinguish code that must
run on a system stack from code that can run on either stack,
even if that distinction is no
longer based on the implementation language.
That is, I expect to add a //go:systemstack comment that,
in terms of the old implementation, tells the compiler,
to pretend this function was written in C.
Change-Id: I33d2ebb2f99ae12496484c6ec8ed07233d693275
Reviewed-on: https://go-review.googlesource.com/2275
Reviewed-by: Russ Cox <rsc@golang.org>
			
			
This commit is contained in:
		
							parent
							
								
									a1c9e10371
								
							
						
					
					
						commit
						e6d3511264
					
				
					 27 changed files with 192 additions and 72 deletions
				
			
		|  | @ -64,7 +64,7 @@ func mallocgc(size uintptr, typ *_type, flags uint32) unsafe.Pointer { | |||
| 		} | ||||
| 		mp.mallocing = 1 | ||||
| 		if mp.curg != nil { | ||||
| 			mp.curg.stackguard = ^uintptr(0xfff) | 0xbad | ||||
| 			mp.curg.stackguard0 = ^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.stackguard = mp.curg.stack.lo + _StackGuard | ||||
| 							mp.curg.stackguard0 = 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.stackguard = mp.curg.stack.lo + _StackGuard | ||||
| 			mp.curg.stackguard0 = 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
	
	 Russ Cox
						Russ Cox