rust-analyzer-proc-macro-srv crashes when a custom allocator is preloaded #18098
Labels
A-proc-macro
proc macro
C-support
Category: support questions
S-unactionable
Issue requires feedback, design decisions or is blocked on other work
As described in oneapi-src/unified-runtime#803, the use of
RTLD_DEEPBIND
in dylib.rs [1] can cause rust-analyzer-proc-macro-srv to crash when a custom memory allocator is preloaded. TheLD_PRELOAD
environment variable is not propagated from Visual Studio Code to the rust-analyzer-proc-macro-srv process that eventually gets spawned, so on my machine, this issue only manifests when a custom allocator is specified in/etc/ld.so.preload
.Since it looks like the
RTLD_DEEPBIND
flag was deliberately added to address an issue, I would assume nothing can be done about this, and this issue can just serve as documentation.Some of the error messages relating to this issue that I've seen:
Depending on the custom allocator that is preloaded, these errors can vary. I think I also saw a SIGSEGV.
[1]
rust-analyzer/crates/proc-macro-srv/src/dylib.rs
Lines 51 to 75 in c54a827
The text was updated successfully, but these errors were encountered: