You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
repository link (if public, optional): none, just a new project with cargo init --lib is enough.
code snippet to reproduce:
#[cfg(test)]#[macro_export]macro_rules! boom {(
$($code:literal),+,
$(param: $param:expr,)?
) => {{let _ = $crate::boom!(@param $($param)*);}};(@param) => {()};(@param $param:expr) => { $param };}#[cfg(test)]mod tests {#[test]fnit_works(){// NOTE: there is an error, but RA crashes before showing itboom!("RAND", param: c7.clone());}}
Rust-analyzer tries to index a project with the only lib.rs file containing the code above and fails:
thread 'PrimeCaches#4' has overflowed its stack
fatal runtime error: stack overflow
[Error - 3:29:29 PM] Server process exited with signal SIGABRT.
[Info - 3:29:29 PM] Connection to server got closed. Server will restart.
true
thread 'PrimeCaches#6' has overflowed its stack
fatal runtime error: stack overflow
[Error - 3:29:30 PM] Server process exited with signal SIGABRT.
[Info - 3:29:30 PM] Connection to server got closed. Server will restart.
true
thread 'PrimeCaches#2' has overflowed its stack
fatal runtime error: stack overflow
[Error - 3:29:32 PM] Server process exited with signal SIGABRT.
[Info - 3:29:32 PM] Connection to server got closed. Server will restart.
true
thread 'PrimeCaches#4' has overflowed its stack
fatal runtime error: stack overflow
[Error - 3:29:34 PM] Server process exited with signal SIGABRT.
[Info - 3:29:34 PM] Connection to server got closed. Server will restart.
true
thread 'PrimeCaches#4' has overflowed its stack
fatal runtime error: stack overflow
[Error - 3:29:36 PM] Server process exited with signal SIGABRT.
[Error - 3:29:36 PM] The Rust Analyzer Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
Sometimes it manages to highlight the code and show "Run test" labels and other stuff, but then it crashes again when I write something.
It starts working again if I fix the macro invocation:
I tried a pre-release version (0.4.2260), but the crash still appears.
Is there any way I can increase the log level to somehow show the error trace on overflow? For some reason setting "RA_LOG": "lsp_server=debug" or "rust-analyzer.trace.server": "verbose" does nothing
rust-analyzer version:
0.3.2257-standalone
rustc version:
rustc 1.84.0 (9fc6b4312 2025-01-07)
editor or extension: VSCode (VSCodium), rust-analyzer extension v0.3.2257
relevant settings: default env, but these are my settings from
settings.json
just in case:repository link (if public, optional): none, just a new project with
cargo init --lib
is enough.code snippet to reproduce:
Rust-analyzer tries to index a project with the only
lib.rs
file containing the code above and fails:Sometimes it manages to highlight the code and show "Run test" labels and other stuff, but then it crashes again when I write something.
It starts working again if I fix the macro invocation:
The text was updated successfully, but these errors were encountered: