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 or memory allocation failure when building #61397

Closed
mrbus opened this issue May 31, 2019 · 2 comments
Closed

Access violation or memory allocation failure when building #61397

mrbus opened this issue May 31, 2019 · 2 comments
Labels
I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. O-windows Operating system: Windows

Comments

@mrbus
Copy link

mrbus commented May 31, 2019

rustc crashes when trying to build project on my old 2Gb 32-bit Windows laptop (but previously it succesfully built).
If cargo build or cargo build --lib is executed without --verbose then first Windows message box appears:
rustc_crash
(Full report is here:
rustc_crash_report.txt
Sorry for russian localization of OS)
and then cargo outputs:

Compiling pokerface v0.0.1 (C:\Rust\PF\pokerface)
memory allocation of 603979776 bytes failed
error: Could not compile pokerface.

If executed with --verbose then output is as follows:
rustc_crash_verbose.txt

rust v.1.34.0, toolchain is stable-i686-pc-windows-gnu, Windows 7 32-bit 2Gb RAM.

I read this: #53149 and this: #33434 and it is not clear what I have to do to solve the problem.

@retep998
Copy link
Member

rustc normally uses a lot of memory, and with 32-bit Windows you have very little address space to work with, so this sounds like expected behavior. Using only a single codegen unit, and disabling incremental should lower rustc's memory usage somewhat.

@estebank estebank added I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. O-windows Operating system: Windows labels Aug 5, 2019
@oli-obk
Copy link
Contributor

oli-obk commented Nov 11, 2019

I don't think we can really do anything here specifically other than trying to reduce memory

@oli-obk oli-obk closed this as completed Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. O-windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

4 participants