• Austin Clements's avatar
    runtime: fix bad pointer with 0 stack barriers · 3193c71c
    Austin Clements authored
    Currently, if the number of stack barriers for a stack is 0, we'll
    create a zero-length slice that points just past the end of the stack
    allocation. This bad pointer causes GC panics.
    
    Fix this by creating a nil slice if the stack barrier count is 0.
    
    In practice, the only way this can happen is if
    GODEBUG=gcstackbarrieroff=1 is set because even the minimum size stack
    reserves space for two stack barriers.
    
    Change-Id: I3527c9a504c445b64b81170ee285a28594e7983d
    Reviewed-on: https://go-review.googlesource.com/31762Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
    3193c71c
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...