Description
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. The LD_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:
proc-macro panicked: proc-macro server did not respond with data: proc-macro server did not respond with data
munmap_chunk(): invalid pointer
proc-macro server exited with signal: 6 (SIGABRT) (core dumped)
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