]> Cypherpunks repositories - gostls13.git/commit
cmd/link: flush file mapping before unmapping
authorCherry Zhang <cherryyz@google.com>
Fri, 29 May 2020 05:59:09 +0000 (01:59 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 1 Jun 2020 20:38:23 +0000 (20:38 +0000)
commit13bc6d4223515ac05afadc13728fb12d7c80f015
tree504647afd0fb2920ac26555aa0652e19fcb1554a
parent8be0de1e7e1f1c3f0d2b4b1ab2b4bc96377a3772
cmd/link: flush file mapping before unmapping

Call FlushViewOfFile before unmapping the output file, for extra
safety. The documentation says the function does not wait for
the data to be written to disk, so it should be cheap.

Fixes #38440.

Change-Id: I05352f15d9305e6e7086a002f61802f74036b710
Reviewed-on: https://go-review.googlesource.com/c/go/+/235639
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
src/cmd/link/internal/ld/outbuf_windows.go