]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix crash with -race on large expr containing string->[]byte conversion
authorRuss Cox <rsc@golang.org>
Wed, 18 Nov 2015 19:37:12 +0000 (14:37 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 19 Nov 2015 19:54:55 +0000 (19:54 +0000)
commit8b1b81f463b949c81f42be528c88fd86d79d1b6f
treebd87e08998fbb1c042df29323b801467e5d0c20a
parent45c3cf68b024e99ddf046e2a858452ea51d84749
cmd/compile: fix crash with -race on large expr containing string->[]byte conversion

The assumption is that there are no nested function calls in complex expressions.
For the most part that assumption is true. It wasn't for these calls inserted during walk.
Fix that.

I looked through all the calls to mkcall in walk and these were the only cases
that emitted calls, that could be part of larger expressions (like not delete),
and that were not already handled.

Fixes #12225.

Change-Id: Iad380683fe2e054d480e7ae4e8faf1078cdd744c
Reviewed-on: https://go-review.googlesource.com/17034
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/compile/internal/gc/order.go
src/runtime/race/testdata/issue12225_test.go [new file with mode: 0644]