Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Compiling with rust-lld causes STATUS_ACCESS_VIOLATION #12041

Open
1 task done
MolotovCherry opened this issue May 19, 2024 · 11 comments
Open
1 task done

[Windows] Compiling with rust-lld causes STATUS_ACCESS_VIOLATION #12041

MolotovCherry opened this issue May 19, 2024 · 11 comments
Labels
bug [core label] panic / crash [core label] windows

Comments

@MolotovCherry
Copy link
Contributor

MolotovCherry commented May 19, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Using rust-lld as 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 issue

I originally came across this because I had my config globally set to rust-lld, which unexpectedly caused this.

Edit: Tested with 5ddd343

config.toml

[target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe"

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.log file to this issue.

No response

@MolotovCherry MolotovCherry added admin read Pending admin review bug [core label] panic / crash [core label] triage Maintainer needs to classify the issue labels May 19, 2024
@osiewicz
Copy link
Contributor

Does it crash with AV in debug build as well?

@MolotovCherry
Copy link
Contributor Author

MolotovCherry commented May 20, 2024

Does it crash with AV in debug build as well?

Yes, it appears to crash in both release and debug builds

@JosephTLyons JosephTLyons added windows and removed triage Maintainer needs to classify the issue admin read Pending admin review labels May 20, 2024
@IceSentry
Copy link
Contributor

I've recently experienced the same issue with a600799

Changing the linker back to the default msvc linker worked.

@paul-hansen
Copy link

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#71520

Note that issue suggests it only happens with lto = "thin" so removing that might be a workaround.

@MolotovCherry
Copy link
Contributor Author

MolotovCherry commented Jun 14, 2024

The Cargo.toml for release profile certainly has lto = "thin", but that doesn't explain the crash on debug profile which doesn't have it. 🤔

@werruww
Copy link

werruww commented Jun 22, 2024

If Zed's problems are solved, can you upload a file exe

@werruww
Copy link

werruww commented Jul 5, 2024

Is there anyone who has been able to run it on Windows?

@MolotovCherry
Copy link
Contributor Author

MolotovCherry commented Jul 5, 2024

Is there anyone who has been able to run it on Windows?

Many people have and do. It works great for me as well (using msvc linker). (But I don't think this issue report is really the place to ask this)

@MolotovCherry
Copy link
Contributor Author

MolotovCherry commented Aug 24, 2024

If Zed's problems are solved, can you upload a file exe

If you'd like to see some builds, there is an unofficial repo which offers some.

Note: This is not official Zed repo, so I offer no guarantees about anything. If you're in doubt, you can always fork it and build it yourself on github actions.

@USTHzhanglu
Copy link

Very disappointed,use

[target.x86_64-pc-windows-msvc]
linker = "link.exe"

not useful

@USTHzhanglu
Copy link

Very disappointed,use

[target.x86_64-pc-windows-msvc]
linker = "link.exe"

not useful

by upgrade Graphics driver, zed work ok. because zed not support lower version vulkan(less than 1.3 maybe)
Zed.log:

Rejected for device extension "VK_KHR_dynamic_rendering" not supported. Please update the driver!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] panic / crash [core label] windows
Projects
None yet
Development

No branches or pull requests

7 participants