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

Access violation exception with nightly-msvc (x86 only) #2310

Closed
pravic opened this issue Dec 29, 2017 · 8 comments
Closed

Access violation exception with nightly-msvc (x86 only) #2310

pravic opened this issue Dec 29, 2017 · 8 comments
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@pravic
Copy link

pravic commented Dec 29, 2017

Funny thing: it works in debug build, but crashes in the release one.

It looks like the failing code is in EarlyLintPass::check_block (according to windows debugger).

https://github.com/rust-lang-nursery/rust-clippy/blob/1ecce2d803dbae76b2956012c3213ce7448cceae/clippy_lints/src/returns.rs#L106-L128

Project which causes this crash: https://github.com/sciter-sdk/rust-sciter (run cargo +nightly clippy).

Env:

rustc 1.25.0-nightly (29c8276 2018-02-07), host: i686-pc-windows-msvc
clippy v0.0.186

@pravic
Copy link
Author

pravic commented Feb 8, 2018

It does not crash with x64 compiler, but does with the x86 one. How is it possible?

@pravic pravic changed the title Access violation exception with nightly-msvc (v0.0.177) Access violation exception with nightly-msvc (x86 only) Feb 8, 2018
@pravic
Copy link
Author

pravic commented Feb 8, 2018

@oli-obk could you add a bug label here?

@oli-obk oli-obk added the C-bug Category: Clippy is not doing the correct thing label Feb 8, 2018
@oli-obk
Copy link
Contributor

oli-obk commented Feb 8, 2018

Thanks for looking into this more closely.

So a debug clippy works but a release clippy fails? Or is it whether the crate is built in release mode?

@pravic
Copy link
Author

pravic commented Feb 8, 2018

Yes, it was about the clippy compiled in debug mode.

Only release and only x86 version crashes.

@mati865
Copy link
Contributor

mati865 commented Dec 17, 2018

It looks like #3345 which should be fixed with current nightly.
@pravic could you retry?

@pravic
Copy link
Author

pravic commented Dec 18, 2018

It was even worse:

$ cargo +stable-i686 clippy
Downloaded lazy_static v1.1.0
Downloaded libc v0.2.43
Compiling version_check v0.1.5
Checking libc v0.2.43
Compiling lazy_static v1.1.0
error: Could not compile libc.
warning: build failed, waiting for other jobs to finish...
error: Could not compile lazy_static.

rustc 1.31.0 (abe02cefd 2018-12-04)
clippy 0.0.212 (2e26fdc 2018-11-22)

But yes, nightly-i686 clippy works well:

rustc 1.33.0-nightly (adbfec2 2018-12-17)
clippy 0.0.212 (a416c5e 2018-12-14)

@pravic
Copy link
Author

pravic commented Dec 18, 2018

Huh, how come that it is the same clippy version (0.0.212) in release and nightly with different revisions?
Looks like nobody's bothered to bump it since July: https://github.com/rust-lang/rust-clippy/releases

@mati865
Copy link
Contributor

mati865 commented Dec 18, 2018

Clippy is no longer distributed as the crate and versions doesn't matter for rustup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

5 participants