-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Compiler crashes when loading macros from a crate that contains syntax extensions #13474
Comments
It looks like it might be running two libsyntaxes in parallel. |
Windows only bug? The same program works fine for me on OS X. |
Can you paste the output of |
Sure:
|
Hm, it appears that this is indeed a windows-only bug. From what I can tell this is happening because loading a dynamic library on windows will also always load its dependencies. This means that there's two copies of the standard library running around, which is always a recipe for disaster (as seen, the TLS key isn't initialized). I believe that it's re-loading libstd because of #13491 (libstd should be a dynamically linked library for rustc). |
In the past, windows was installed from stage3 to guarantee convergence between the host and target artifacts, but syntax extensions on all platforms are currently relying on convergence, so special casing this one platform has become less relevant over time. This will also have the added benefit of dealing with rust-lang#13474 and rust-lang#13491. These issues will be closed after next next nightly is confirmed to fix them.
In the past, windows was installed from stage3 to guarantee convergence between the host and target artifacts, but syntax extensions on all platforms are currently relying on convergence, so special casing this one platform has become less relevant over time. This will also have the added benefit of dealing with rust-lang#13474 and rust-lang#13491. These issues will be closed after next next nightly is confirmed to fix them.
Closed by efec34a |
Rustc crashes when running following code:
Here's gdb output:
Note, it works fine with crates that use macros defined with macro_rules (e.g. log) or with phase(link) instead of phase(syntax).
I'm using Windows 8.1 x64 with nightly installer that I've had downloaded few hours ago, but I've also installed 0.10 and it has the same problem:
The text was updated successfully, but these errors were encountered: