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

globset: Access violation when built with lto = "thin" on Windows #1508

Closed
forbjok opened this issue Mar 4, 2020 · 6 comments
Closed

globset: Access violation when built with lto = "thin" on Windows #1508

forbjok opened this issue Mar 4, 2020 · 6 comments

Comments

@forbjok
Copy link

forbjok commented Mar 4, 2020

Version: globset v0.4.4
OS: Windows 10 Pro x64 v1909

Calling globset.is_match(...) causes the program to crash with an access violation if built with lto = "thin" under certain circumstances.

The circumstances being (as far as I can tell):

  • OS = Windows (tested on Arch Linux and could not reproduce it there)
  • Target = x86_64-pc-windows-msvc (I haven't tested every other target, but it does not happen with i686-pc-windows-msvc)

I don't know if this is actually an error in globset, or if it's some obscure compiler error that just happens to be triggered by globset.

It happens both with stable and nightly Rust.

Error message:
ConEmu64_WJEnWXAnNJ

Minimal reproduction project:
lto-thin-repro.zip

@BurntSushi
Copy link
Owner

Thanks for the bug report, but yeah, this doesn't look like it belongs here. This looks more like a compiler bug I guess? You might want to file it on rust-lang/rust, although this might be hard to diagnose without a smaller reproduction (i.e., that doesn't use a fairly big crate like globset).

@lespea
Copy link

lespea commented Mar 4, 2020

Do you have ryzen by chance? rust-lang/rust#63959

Should be fixed on stable soon.

@forbjok
Copy link
Author

forbjok commented Mar 4, 2020

Do you have ryzen by chance? rust-lang/rust#63959

Should be fixed on stable soon.

Nope, it's an Intel Core i9-9900K CPU on Intel Z390 chipset.

@lespea
Copy link

lespea commented Mar 4, 2020

Interesting. Does it panic on nightly as well?

@forbjok
Copy link
Author

forbjok commented Mar 5, 2020

Yep, same error in both stable and nightly. I also tested on an older machine (Intel Core i7-6700, Intel Z170 chipset), and I get it there as well.

@forbjok
Copy link
Author

forbjok commented Mar 5, 2020

I remembered I had configured cargo to use the LLVM linker, because it's faster. Turns out the problem is also restricted to the LLVM linker, but still only the 64-bit target.
Seems pretty likely that it's actually an LLVM linker bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants