Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upBeta regression: References to what's supposed to be static singleton don't pointer compare as equal on 1.23.0-beta.1 #46371
Comments
hsivonen
referenced this issue
Nov 29, 2017
Closed
Release builds broken with Rust 1.23.0-beta.1 #26
kennytm
added
C-bug
regression-from-stable-to-beta
labels
Nov 29, 2017
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
Hm, statics should always have external linkage (we don't use |
This comment has been minimized.
This comment has been minimized.
arielb1
added
T-compiler
P-high
labels
Nov 30, 2017
michaelwoerister
self-assigned this
Nov 30, 2017
This comment has been minimized.
This comment has been minimized.
|
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? |
This comment has been minimized.
This comment has been minimized.
|
I don't think this was fixed by that PR. |
This comment has been minimized.
This comment has been minimized.
Mark-Simulacrum
added this to the 1.23 milestone
Dec 5, 2017
This comment has been minimized.
This comment has been minimized.
|
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. |
bors
added a commit
that referenced
this issue
Dec 22, 2017
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
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? |
This comment has been minimized.
This comment has been minimized.
Good question. @alexcrichton would know best, I guess? |
This comment has been minimized.
This comment has been minimized.
|
There's info on how to test it in the prerelease announcement, lemme know if it doesn't work though! |
This comment has been minimized.
This comment has been minimized.
|
The 1.23.0 release candidate works. Thank you! |
hsivonen commentedNov 29, 2017
Steps to reproduce:
git clone https://github.com/hsivonen/encoding_rscd encoding_rsrustup default betacargo test --releaseActual results:
Note how left and right in both cases have the same debug stringification.
The
eqimplementation 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