diff options
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | libgo/go/runtime/mwbbuf.go | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 48b4249..78597da 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -0f6d673d5b1a3474c3424cb6994ae8ff9baed255 +838f926c93898767f0337122725a4f52a1335186 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/go/runtime/mwbbuf.go b/libgo/go/runtime/mwbbuf.go index 4c875ff..a27406e 100644 --- a/libgo/go/runtime/mwbbuf.go +++ b/libgo/go/runtime/mwbbuf.go @@ -285,10 +285,17 @@ func wbBufFlush1(_p_ *p) { // path to reduce the rate of flushes? continue } - obj, span, objIndex := findObject(ptr, 0, 0, false) + obj, span, objIndex := findObject(ptr, 0, 0, !usestackmaps) if obj == 0 { continue } + if span.isFree(objIndex) { + // For gccgo, it is possible that we have a write barrier + // writing to unintialized stack memory. So we could see + // a bad pointer in the write barrier buffer. Don't mark + // it in this case. + continue + } // TODO: Consider making two passes where the first // just prefetches the mark bits. mbits := span.markBitsForIndex(objIndex) |