Closed
Description
Problem
cargo run test
shows "memory allocation of .. bytes failed" when I run specific test case:
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.20s
Running `target/debug/cargo test source_replacement`
memory allocation of 63063237072 bytes failed
Aborted (core dumped)
I expect there are no issues when I use cargo run test
to run the tests.
Steps
- Run
rustup update
to update needed tools to buildcargo
- Clone
cargo
repository cd
intocargo
repository- Change to
master
branch - Run
cargo check --workspace
- Run
cargo build
- Run
cargo run test source_replacement
here is the test video that contains step.5 to step.7 for the reference: 20241021_cargo_test_video.zip
Possible Solution(s)
No response
Notes
The error message in this issue is similar to #7543
Version
cargo 1.84.0 (edd36eb 2024-10-21)
release: 1.84.0
commit-hash: edd36eb
commit-date: 2024-10-21
host: x86_64-unknown-linux-gnu
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.5.0 (sys:0.4.74+curl-8.9.0 system ssl:OpenSSL/3.0.13)
os: Ubuntu 24.4.0 (noble) [64-bit]
additional hardware information of test machine:
Memory: 16 GB