mirror of
https://github.com/golang/go
synced 2024-09-24 19:30:12 -06:00
runtime: reset typed dangling pointer
If for whatever reason seh points into Go heap region, the dangling pointer will cause memory corruption during GC. Update #5193. R=golang-dev, alex.brainman, iant CC=golang-dev https://golang.org/cl/8402045
This commit is contained in:
parent
44c4a0d1c4
commit
77354c39f9
@ -695,6 +695,7 @@ runtime·dropm(void)
|
||||
|
||||
// Undo whatever initialization minit did during needm.
|
||||
runtime·unminit();
|
||||
m->seh = nil; // reset dangling typed pointer
|
||||
|
||||
// Clear m and g, and return m to the extra list.
|
||||
// After the call to setmg we can only call nosplit functions.
|
||||
|
Loading…
Reference in New Issue
Block a user