• Austin Clements's avatar
    cmd/compile: mark memclrHasPointers calls as write barriers · c8ca7931
    Austin Clements authored
    There are two places where the compiler generates memclrHasPointers
    calls. These are effectively write barriers, but the compiler doesn't
    currently record them as such in the function. As a result code like
    
      for i := range a {
        a[i] = nil
      }
    
    inserts a write barrier for the assignment to a[i], but the compiler
    doesn't report this. Hence, it's not reported in the -d=wb output, and
    it's not checked against //go:nowritebarrier annotations.
    
    Change-Id: I40299ebc9824f05cf516cba494d4c086b80ffb53
    Reviewed-on: https://go-review.googlesource.com/c/152722
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
    c8ca7931
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...