Repository navigation
[Windows] Compiling with rust-lld causes STATUS_ACCESS_VIOLATION #12041
Description
Activity
- addedbugDEPRECATED label: use issue type 'Bug' insteadDEPRECATED label: use issue type 'Bug' insteadcrashDEPRECATED label: use issue type 'Crash' insteadDEPRECATED label: use issue type 'Crash' instead
on May 19, 2024 Does it crash with AV in debug build as well?
Does it crash with AV in debug build as well?
Yes, it appears to crash in both release and debug builds
- addedplatform:windowshappens only on Windows, not other OShappens only on Windows, not other OSand removed
on May 20, 2024 I've recently experienced the same issue with a600799
Changing the linker back to the default msvc linker worked.
I've seen this before here: rust-lang/rust#111480
It's listed as the last open issue blocking using lld as the default linker on Windows: rust-lang/rust#71520Note that issue suggests it only happens with
lto = "thin"so removing that might be a workaround.Reacted by Kirill BulatovThe
Cargo.tomlfor release profile certainly haslto = "thin", but that doesn't explain the crash on debug profile which doesn't have it. 🤔Reacted by Paul HansenMolotovCherry commented
on Jul 5, 2024 on Jul 5, 2024 · Hidden as off-topicAuthorshow commentMore actionsMolotovCherry commented
on Aug 24, 2024 on Aug 24, 2024 · Hidden as off-topicAuthorshow commentMore actionsVery disappointed,use
[target.x86_64-pc-windows-msvc] linker = "link.exe"
not useful
- removedbugDEPRECATED label: use issue type 'Bug' insteadDEPRECATED label: use issue type 'Bug' insteadcrashDEPRECATED label: use issue type 'Crash' insteadDEPRECATED label: use issue type 'Crash' instead
on Jan 31, 2025 I'm going to go ahead and close this. We do not officially support windows and so the supported compiler/linker requirements are still in flux and will be further nailed down in the future.
Thanks for reporting.
Summary
Using
rust-lldas the linker breaks Zed. On startup, Zed immediately crashes with a status access violation. Using the default msvc linker appears to work without issue. Unsure whether this is a rust or Zed issueI originally came across this because I had my config globally set to rust-lld, which unexpectedly caused this.
Edit: Tested with 5ddd343
config.toml
Environment
Visual studio 17.9.7 with Windows 11 SDK (10.0.22621.0) and MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)
cargo 1.78.0 (54d8815d0 2024-03-26)
release: 1.78.0
commit-hash: 54d8815d04fa3816edc207bbc4dd36bf18014dbc
commit-date: 2024-03-26
host: x86_64-pc-windows-msvc
libgit2: 1.7.2 (sys:0.18.2 vendored)
libcurl: 8.6.0-DEV (sys:0.4.72+curl-8.6.0 vendored ssl:Schannel)
os: Windows 10.0.22631 (Windows 11 Professional) [64-bit]
If applicable, attach your
~/Library/Logs/Zed/Zed.logfile to this issue.No response