• Dmitry Vyukov's avatar
    syscall: correct code for cover cmd · 53a8ee50
    Dmitry Vyukov authored
    Fixes #10378
    
    This is clumsy, but currently cover tool fails as:
    
    $ go test -run=none -cover syscall
    syscall_linux_amd64.go:15: can only use //go:noescape with external func implementations
    FAIL	syscall [build failed]
    
    This happens because cover tool mishandles //go: comments.
    r and gri said that fixing cover is infeasible due to go/ast limitations.
    
    So at least fix the offending code so that coverage works.
    This come up in context of coverage-guided fuzzing which works best
    with program-wide coverage.
    
    Change-Id: I142e5774c9f326ed38cb202693bd4edae93879ba
    Reviewed-on: https://go-review.googlesource.com/8723Reviewed-by: 's avatarRob Pike <r@golang.org>
    53a8ee50
syscall_linux_amd64.go 4.81 KB