diff options
| author | Iskander Sharipov <iskander.sharipov@intel.com> | 2018-07-27 19:32:17 +0300 |
|---|---|---|
| committer | Iskander Sharipov <iskander.sharipov@intel.com> | 2018-09-03 14:28:51 +0000 |
| commit | ff468a43be1740890a0f3b64a6ab920ea92c2c17 (patch) | |
| tree | 2675b9edeecf9bb8180fb3b67761fe098e83930d /src/database/sql/sql.go | |
| parent | b794ca64d29f3e584cbdf49bde7141d3c12dd2ab (diff) | |
| download | go-ff468a43be1740890a0f3b64a6ab920ea92c2c17.tar.xz | |
cmd/compile/internal/gc: better handling of self-assignments in esc.go
Teach escape analysis to recognize these assignment patterns
as not causing the src to leak:
val.x = val.y
val.x[i] = val.y[j]
val.x1.x2 = val.x1.y2
... etc
Helps to avoid "leaking param" with assignments showed above.
The implementation is based on somewhat similiar xs=xs[a:b]
special case that is ignored by the escape analysis.
We may figure out more generalized version of this,
but this one looks like a safe step into that direction.
Updates #14858
Change-Id: I6fe5bfedec9c03bdc1d7624883324a523bd11fde
Reviewed-on: https://go-review.googlesource.com/126395
Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/database/sql/sql.go')
0 files changed, 0 insertions, 0 deletions
