• 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
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...