• Russ Cox's avatar
    runtime: make sure heapBitsBulkBarrier cannot be preempted · 3ae17043
    Russ Cox authored
    Changes the torture test in #12068 from failing about 1/10 times
    to not failing in almost 2,000 runs.
    
    This was only happening in -race mode because functions are
    bigger in -race mode, so a few of the helpers for heapBitsBulkBarrier
    were not being inlined, and they were not marked nosplit,
    so (only in -race mode) the write barrier was being preempted by GC,
    causing missed pointer updates.
    
    Filed issue #12069 for diagnosis of any other similar errors.
    
    Fixes #12068.
    
    Change-Id: Ic174d9b050ba278b18b08ab0d85a73c33bd5b175
    Reviewed-on: https://go-review.googlesource.com/13364Reviewed-by: 's avatarAustin Clements <austin@google.com>
    3ae17043
mbitmap.go 56.3 KB