Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flush executables to disk after linkage #48545

Closed
liranringel opened this issue Feb 26, 2018 · 0 comments
Closed

Flush executables to disk after linkage #48545

liranringel opened this issue Feb 26, 2018 · 0 comments
Labels
C-bug Category: This is a bug. O-windows Operating system: Windows

Comments

@liranringel
Copy link
Contributor

I read that: https://randomascii.wordpress.com/2018/02/25/compiler-bug-linker-bug-windows-kernel-bug/amp/
The author suggests to ensure that the binary is flushed to disk after linkage.
We could use File::sync_all which eventually calls FlushFileBuffers here:

fn exec_linker(sess: &Session, cmd: &mut Command, tmpdir: &Path)

@Mark-Simulacrum Mark-Simulacrum added O-windows Operating system: Windows C-bug Category: This is a bug. labels Feb 26, 2018
alexcrichton added a commit to alexcrichton/rust that referenced this issue Apr 5, 2018
…rister

Flush executables to disk after linkage

A problem caused by not doing so in Chrome has been reported [here](https://randomascii.wordpress.com/2018/02/25/compiler-bug-linker-bug-windows-kernel-bug/amp/).

`File::sync_all()` calls `FlushFileBuffers()` down the line, causing potentially unflushed buffers on high I/O-load systems to flush and preventing nasty non-reproducible bugs.

Closes rust-lang#48545
kennytm added a commit to kennytm/rust that referenced this issue Apr 5, 2018
…rister

Flush executables to disk after linkage

A problem caused by not doing so in Chrome has been reported [here](https://randomascii.wordpress.com/2018/02/25/compiler-bug-linker-bug-windows-kernel-bug/amp/).

`File::sync_all()` calls `FlushFileBuffers()` down the line, causing potentially unflushed buffers on high I/O-load systems to flush and preventing nasty non-reproducible bugs.

Closes rust-lang#48545
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. O-windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

2 participants