• 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
..
amd64 Loading commit data...
arm Loading commit data...
arm64 Loading commit data...
gc Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
ppc64 Loading commit data...
s390x Loading commit data...
ssa Loading commit data...
syntax Loading commit data...
test Loading commit data...
x86 Loading commit data...