mirror of
https://github.com/golang/go
synced 2024-11-19 01:54:39 -07:00
[dev.power64] runtime: fix early GC of Defer objects
go_bootstrap was panicking during runtime initialization (under runtime.main) because Defer objects were being prematurely GC'd. This happened because of an incorrect change to runtime·unrollgcprog_m to make it endian-agnostic during the conversion of runtime bitmaps to byte arrays. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/161960044
This commit is contained in:
parent
f0bd539c59
commit
a9b9ecc9ef
@ -1799,7 +1799,7 @@ runtime·unrollgcprog_m(void)
|
||||
}
|
||||
|
||||
// atomic way to say mask[0] = 1
|
||||
x = typ->gc[0];
|
||||
x = *(uintptr*)mask;
|
||||
((byte*)&x)[0] = 1;
|
||||
runtime·atomicstorep((void**)mask, (void*)x);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user