-
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
Beta regression: References to what's supposed to be static singleton don't pointer compare as equal on 1.23.0-beta.1 #46371
Comments
Will probably be the codegen-units thing. Singleton statics should use linkonce/linkonce_odr linkage, although it is not entirely clear to me whether it is up to user to do so or up to us (the compiler). cc @michaelwoerister @alexcrichton EDIT: It is certainly a user responsibility if a singleton common for multiple crate versions is desired. |
Hm, statics should always have external linkage (we don't use |
Being fixed by #46253 is possible; I can't reproduce with today's nightly rust. @michaelwoerister, can you make sure that gets into to the next beta, please? |
I don't think this was fixed by that PR. |
I cannot reproduce this with the latest beta anymore. Could you give it a try, @hsivonen? Also, regarding the question why crater did not find this issue: it seems that crater does not do optimized builds and thus could not have run into this. |
Bounce out the layout refactor from beta @eddyb's #45225 was supposed to get into get into 1.24, but due to an ordering mistake, it had snuck into 1.23. That wide-effect translation-changing PR had poked LLVM's weak corners and caused many regressions (3 of them have fixes I include here, but also #46897, #46845, #46449, #46371). I don't think it is a good idea to land it in the beta (1.23) because there are bound to be some regressions we didn't patch. Therefore, I am reverting it in time for stable, along with its related regression fixes. r? @michaelwoerister (I think)
Note that @arielb1 claimed that #46925 fixed this regression. (Though, oddly enough, @michaelwoerister 's statement of being unable to reproduce preceded that PR landing...) Anyway, without triggering a beta |
Yeah, I probably was wrong. I didn’t look at the example closely enough before making the statement and forgot to edit it later on. Sorry. |
It seems that stable is 1.22.1 and beta is 1.24.0-beta.1. Those both work. Nightly works, too. What should I tell rustup to test the latest 1.23? |
Good question. @alexcrichton would know best, I guess? |
There's info on how to test it in the prerelease announcement, lemme know if it doesn't work though! |
The 1.23.0 release candidate works. Thank you! |
Steps to reproduce:
git clone https://github.com/hsivonen/encoding_rs
cd encoding_rs
rustup default beta
cargo test --release
Actual results:
Note how left and right in both cases have the same debug stringification.
The
eq
implementation assumes that there is one instance of each encoding so it's OK to pointer compare them.Various previous stable channel releases work. Nightly works. Beta works in debug mode. 1.23.0-beta.1 fails in release mode.
encoding_rs issue, Firefox bug
The text was updated successfully, but these errors were encountered: