1
0
mirror of https://github.com/golang/go synced 2024-10-04 04:41:23 -06:00
go/src/cmd
Russ Cox 948b2c722b cmd/gc: fix x=x crash
The 'nodarg' function is used to obtain a Node*
representing a function argument or result.
It returned a brand new Node*, but that violates
the guarantee in most places in the compiler that
two Node*s refer to the same variable if and only if
they are the same Node* pointer. Reestablish that
invariant by making nodarg return a preexisting
named variable if present.

Having fixed that, avoid any copy during x=x in
componentgen, because the VARDEF we emit
before the copy marks the lhs x as dead incorrectly.

The change in walk.c avoids modifying the result
of nodarg. This was the only place in the compiler
that did so.

Fixes #8097.

LGTM=r, khr
R=golang-codereviews, r, khr
CC=golang-codereviews, iant
https://golang.org/cl/102820043
2014-05-28 19:50:19 -04:00
..
5a runtime: provide gc maps for the reflect.callXX frames. 2014-05-21 14:28:34 -07:00
5c liblink, cmd/gc, cmd/{5,6,8}{a,c}: rename linkwriteobj to writeobj 2014-04-16 14:36:44 -07:00
5g cmd/gc: fix x=x crash 2014-05-28 19:50:19 -04:00
5l runtime: use duff zero and copy to initialize memory 2014-05-07 13:17:10 -07:00
6a liblink, cmd/gc, cmd/{5,6,8}{a,c}: rename linkwriteobj to writeobj 2014-04-16 14:36:44 -07:00
6c liblink, cmd/gc, cmd/{5,6,8}{a,c}: rename linkwriteobj to writeobj 2014-04-16 14:36:44 -07:00
6g cmd/gc: fix x=x crash 2014-05-28 19:50:19 -04:00
6l liblink, cmd/ld: reenable nosplit checking and test 2014-04-16 22:08:00 -04:00
8a liblink, cmd/gc, cmd/{5,6,8}{a,c}: rename linkwriteobj to writeobj 2014-04-16 14:36:44 -07:00
8c liblink, cmd/gc, cmd/{5,6,8}{a,c}: rename linkwriteobj to writeobj 2014-04-16 14:36:44 -07:00
8g cmd/gc: fix x=x crash 2014-05-28 19:50:19 -04:00
8l liblink, cmd/ld: reenable nosplit checking and test 2014-04-16 22:08:00 -04:00
addr2line build: make nacl pass 2014-05-20 12:10:19 -04:00
api std lib: fix various typos in comments 2014-05-02 13:17:55 -07:00
cc build: remove tmp dir names from objects, support GOROOT_FINAL again 2014-04-15 20:46:46 -04:00
cgo cmd/cgo: given typedef struct S T, make C.T and C.struct_S interchangeable 2014-05-28 14:04:31 -04:00
dist undo CL 84040045 / 5302b4c58aa0 2014-05-20 14:02:57 -04:00
fix cmd/fix: remove obsolete testdata. 2013-06-02 15:40:32 +02:00
gc cmd/gc: fix x=x crash 2014-05-28 19:50:19 -04:00
go cmd/go: do not miss an error if import path contains "cmd/something" 2014-05-27 23:58:03 -04:00
gofmt all: fix "the the" typos. 2014-05-20 14:42:07 -04:00
ld cmd/ld: correctly compute note size on NetBSD. 2014-05-21 06:18:45 -07:00
link src: fix issues found by go vet std 2014-04-26 19:54:48 -07:00
nm build: make nacl pass 2014-05-20 12:10:19 -04:00
objdump cmd/objdump: fix dissasembly of Plan 9 object files 2014-05-21 23:24:38 +02:00
pack build: make nacl pass 2014-05-20 12:10:19 -04:00
yacc cmd/yacc: expr example support windows 2013-12-19 12:14:07 -05:00