mirror of https://github.com/golang/go.git
runtime: work around 5c bug in GC code.
5c miscompiles *p++ = struct_literal. R=dave, golang-dev CC=golang-dev https://golang.org/cl/7065069
This commit is contained in:
parent
9204eb4d3c
commit
6e981c181c
|
|
@ -338,7 +338,8 @@ flushptrbuf(PtrTarget *ptrbuf, PtrTarget **ptrbufpos, Obj **_wp, Workbuf **_wbuf
|
|||
if((bits & (bitAllocated|bitMarked)) != bitAllocated)
|
||||
continue;
|
||||
|
||||
*bitbufpos++ = (BitTarget){obj, ti, bitp, shift};
|
||||
*bitbufpos = (BitTarget){obj, ti, bitp, shift};
|
||||
bitbufpos++;
|
||||
}
|
||||
|
||||
runtime·lock(&lock);
|
||||
|
|
@ -541,7 +542,8 @@ scanblock(Workbuf *wbuf, Obj *wp, uintptr nobj, bool keepworking)
|
|||
|
||||
// iface->tab
|
||||
if((void*)iface->tab >= arena_start && (void*)iface->tab < arena_used) {
|
||||
*ptrbufpos++ = (PtrTarget){iface->tab, (uintptr)itabtype->gc};
|
||||
*ptrbufpos = (PtrTarget){iface->tab, (uintptr)itabtype->gc};
|
||||
ptrbufpos++;
|
||||
if(ptrbufpos == ptrbuf_end)
|
||||
flushptrbuf(ptrbuf, &ptrbufpos, &wp, &wbuf, &nobj, bitbuf);
|
||||
}
|
||||
|
|
@ -568,7 +570,8 @@ scanblock(Workbuf *wbuf, Obj *wp, uintptr nobj, bool keepworking)
|
|||
stack_top.b += PtrSize;
|
||||
obj = *(byte**)i;
|
||||
if(obj >= arena_start && obj < arena_used) {
|
||||
*ptrbufpos++ = (PtrTarget){obj, 0};
|
||||
*ptrbufpos = (PtrTarget){obj, 0};
|
||||
ptrbufpos++;
|
||||
if(ptrbufpos == ptrbuf_end)
|
||||
flushptrbuf(ptrbuf, &ptrbufpos, &wp, &wbuf, &nobj, bitbuf);
|
||||
}
|
||||
|
|
@ -654,7 +657,8 @@ scanblock(Workbuf *wbuf, Obj *wp, uintptr nobj, bool keepworking)
|
|||
}
|
||||
|
||||
if(obj >= arena_start && obj < arena_used) {
|
||||
*ptrbufpos++ = (PtrTarget){obj, objti};
|
||||
*ptrbufpos = (PtrTarget){obj, objti};
|
||||
ptrbufpos++;
|
||||
if(ptrbufpos == ptrbuf_end)
|
||||
flushptrbuf(ptrbuf, &ptrbufpos, &wp, &wbuf, &nobj, bitbuf);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue