• David Chase's avatar
    cmd/internal/gc: move check for large-hence-heap-allocated types into escape analysis · e5060c7f
    David Chase authored
    Before this change, the check for too-large arrays (and other large
    types) occurred after escape analysis.  If the data moved off stack
    and onto the heap contained any pointers, it would therefore escape,
    but because the too-large check occurred after escape analysis this
    would not be recorded and a stack pointer would leak to the heap
    (see the modified escape_array.go for an example).
    
    Some of these appear to remain, in calls to typecheck from within walk.
    
    Also corrected a few comments in escape_array.go about "BAD"
    analysis that is now done correctly.
    
    Enhanced to move aditional EscNone-but-large-so-heap checks into esc.c.
    
    Change-Id: I770c111baff28a9ed5f8beb601cf09dacc561b83
    Reviewed-on: https://go-review.googlesource.com/10268Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    e5060c7f
Name
Last commit
Last update
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...