-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Segmentation fault compiling tinyvec #79558
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
Comments
If you build on a machine with more memory available, does it work? Rustc might be running out of memory. |
Stack trace from a debugger, please. |
Sorry for the delay in answering you; at the moment I don't have the possibility to test it with more ram |
@mzanrosso could you get a stack trace in that case? With GDB it would look like this:
|
I have never used this tool, is the cargo backtrace okay with you? |
RUST_BACKTRACE won't give you any information because this comes from a segfault. If you're more comfortable using a different debugger that would work too but you won't get it just from environment variables. |
I am trying |
It is very likely an issue of rustc running out of memory, yes. The question is why, and if rustc should be able to handle the situation better than segfault? (Given the nature of the stacktrace, a wild speculation is that the memory might be exhausted even if close to infinite amounts were available.) When attempting to compiling tinyvec inside a debugger:
the resulting stdout+stderr file has the following interesting property:
and stacktrace:
Some eight thousand or so identical lines removed.
The compilation above is against I have not made any analysis on what tinyvec actually does, whether the code is written correctly, or if it indeed should fail to compile. I do believe code shouldn't manage to crash the compiler though, and assume you would agree on at least that last part? |
FYI, this looks like a dup of #79438 |
@nospam3089 It's written correctly as far as I know (tens of thousands of downloads a day off of crates.io, no significant bugs reported), and should not crash the compiler to build. |
I was unable to reproduce this with 1.49.0, and agree it does indeed look very similar to 79438. I would suggest @mzanrosso, the ticket owner, to verify and either close this ticket or mark it as a duplicate as applicable. |
#78607 landed in 1.49, which was released today. |
Hi everyone, as I wrote here LINK I have a problem with a segmentation fault compiling tinyvec.
First of all i have a VM with omnios and when I try to do cargo build on a project that has an indirect dependency tinyvec goes into segmentation fault.
The main specifications of the VM are these:
OS: OmniOS v11 r151030cc i386
CPU: Intel i5-5250U (1) @ 1.600GHz
RAM: 1527MiB
RUSTC: v1.47.0
CARGO: v1.47.0
GCC: 5.5.0
And the console output is this:
[PATH OVERWRITTEN] = real path replaced for privacy
Tell me if you need other things to better understand and solve the problem;
any help we can get here is really appreciated, thank you for your time.
The text was updated successfully, but these errors were encountered: