#17487·cargo

Cargo crashes with hardend_malloc & how to configure not to?

Author: helinoscoolCreated Sep 18, 2026Updated Sep 18, 2026
LabelsC-bugS-triage

Problem

When running cargo commands I get the following error:

cargo check failed to start: Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(unix_wait_status(25856))):
error: process didn't exit successfully: `rustc -vV` (signal: 6, SIGABRT: process abort signal)
--- stderr
fatal allocator error: invalid uninitialized allocator usage

Steps

  1. Use secureblue or manually configure hardend_malloc
  2. Try cargo install/build/etc command
  3. See error

Possible Solution(s)

Allowing circumventing it through the .config, but I could not figure it out. Using a alias in bash, but certain programs call on it so ideally cargo should detect if LD_PRELOAD is used and use/ignore it.

Notes

I tried the below without success:

[build]
rustflags = ["LD_PRELOAD=''"]
[env]
LD_PRELOAD = "''"

Manually setting LD_PRELOAD='' before the cargo command did work. Like LD_PRELOAD='' cargo build

Version

cargo 1.98.1 (797e8a9bc 2026-08-05) (Homebrew)
release: 1.98.1
commit-hash: 797e8a9bca276c1c9f9f738d2a20f484fa4eea9d
commit-date: 2026-08-05
host: x86_64-unknown-linux-gnu
libgit2: 1.9.7 (sys:0.21.0 system)
libcurl: 8.22.0 (sys:0.4.90+curl-8.21.0 system ssl:OpenSSL/3.6.4)
os: Fedora 44.0.0 [64-bit]