• Austin Clements's avatar
    runtime: use 4K as the boundary of legal pointers · 7aefdfde
    Austin Clements authored
    Currently, the check for legal pointers in stack copying uses
    _PageSize (8K) as the minimum legal pointer. By default, Linux won't
    let you map under 64K, but
    
    1) it's less clear what other OSes allow or will allow in the future;
    
    2) while mapping the first page is a terrible idea, mapping anywhere
    above that is arguably more justifiable;
    
    3) the compiler only assumes the first physical page (4K) is never
    mapped.
    
    Make the runtime consistent with the compiler and more robust by
    changing the bad pointer check to use 4K as the minimum legal pointer.
    
    This came out of discussions on CLs 34663 and 34719.
    
    Change-Id: Idf721a788bd9699fb348f47bdd083cf8fa8bd3e5
    Reviewed-on: https://go-review.googlesource.com/34890
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    7aefdfde
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
trace Loading commit data...
vendor Loading commit data...
vet Loading commit data...