-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
ICE 'allocation missing in dead_alloc_map' in rustc_mir::interpret when compiling Servo #55223
Comments
I honestly don't know what your code does, but from the error message and the backtrace I was able to create #![feature(const_let)]
union Foo<'a> {
y: &'a (),
long_live_the_unit: &'static (),
}
const FOO: &() = {
let y = ();
unsafe { Foo { y: &y }.long_live_the_unit }
};
fn main() {
} |
cc @nikomatsakis @pnkfelix I think (haven't bisected yet) that #55152 is the likelyest candidate to have regressed the following (previously successfully compiling code example): struct Slice(&'static [&'static [u8]]);
static MAP: Slice = Slice(&[
b"CloseEvent" as &'static [u8],
]); the following warning will keep the code compiling but cause dangling safe references in downstream code
|
"dangling safe references" ? Oh, you must mean "dangling |
Do we not guarantee that an expression like |
in particular, the code seems to work fine if I replace |
(We probably should fork off separate issues to track the distinct problems that @oli-obk has uncovered here...) |
cc @eddyb -- this is related to the drop of temporaries in static |
Er, never mind, my bad. The bug here is that promotion is not happening due to the cast, which is something that @oli-obk and I discussed on the PR -- it's a result presumably of needing to "loosen" the promotion rules to permit user type ascriptions. |
In #55152 we were talking about const propagation, not const promotion ;) I have no idea why your PR would break promotion in this case. I checked the const promotion code, and we're already treating type ascription as a nop. |
Add a workaround for a rustc ICE While rust-lang/rust#55223 is being fixed, this workaround will allow servo to compile on the latest nightly rustc r? @SimonSapin --- - [ ] `./mach build -d` does not report any errors * I'm getting ``` Collecting voluptuous==0.10.5 (from -r /home/oliver/Projects/rust/servo/python/requirements.txt (line 18)) Using cached https://files.pythonhosted.org/packages/c3/81/c84f8a3e723b760fdd1c41fc80201cb80cd29c1bce5159d8918c58df7d2a/voluptuous-0.10.5.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-Qdty2x/voluptuous/setup.py", line 16, in <module> f.write(long_description) UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 1229: ordinal not in range(128) ``` locally, no clue how to continue from there. The script crate compiles fine with `cargo build` - [ ] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because the `script` crate just won't compile without this change <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22000) <!-- Reviewable:end -->
…lfJung Change the ICE from rust-lang#55223 to a hard error cc @SimonSapin r? @RalfJung
…lfJung Change the ICE from rust-lang#55223 to a hard error
closing as duplicate of #55288, which is where the bulk of the remaining work is |
…lfJung Change the ICE from rust-lang#55223 to a hard error cc @SimonSapin r? @RalfJung
…lfJung Change the ICE from rust-lang#55223 to a hard error cc @SimonSapin r? @RalfJung
Change the ICE from #55223 to a hard error cc @SimonSapin r? @RalfJung fixes #55287
The text was updated successfully, but these errors were encountered: