Skip to content

const-eval ICE: allocation missing in dead_alloc_map #55287

Closed
@pnkfelix

Description

@pnkfelix
Member

Spawned off of @oli-obk 's example on #55223:

play

#![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() {
}

Activity

changed the title [-]const-eval allocation missing in dead_alloc_map[/-] [+]const-eval ICE: allocation missing in dead_alloc_map[/+] on Oct 23, 2018
added
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Oct 23, 2018
pnkfelix

pnkfelix commented on Oct 25, 2018

@pnkfelix
MemberAuthor

@oli-obk to be clear: we don't need to use feature(const_let) to reproduce the problem, right? I.e. hypothetically examples exist that don't use that feature?

In particular I know this problem is in some way related to #55288, which is definitely a true regression of stable code.

oli-obk

oli-obk commented on Oct 25, 2018

@oli-obk
Contributor

Right, this here is not really a regression. It is just an ICE that should be an error and it is fixed by #55262

We can probably do this without const_let, but I couldn't come up with an example.

kornelski

kornelski commented on Oct 26, 2018

@kornelski
Contributor
sighol

sighol commented on Oct 26, 2018

@sighol

I have tried to reduce the problem. This repository is smaller, but still fails on nightly-2018-10-25: rustc-panic-dead_alloc_map. The same crate builds on stable.

oli-obk

oli-obk commented on Oct 26, 2018

@oli-obk
Contributor

I think you are encountering #55288 which has a fix in #55385 (making everything work again)

This issue is different, even though the symptom is the same right now. When this issue is fixed (via #55262), the ICE will become a hard error.

added a commit that references this issue on Nov 6, 2018

Auto merge of #55262 - oli-obk:dangling_alloc_id_ice, r=RalfJung

1 remaining item

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @kornelski@pnkfelix@oli-obk@sighol

      Issue actions

        const-eval ICE: allocation missing in dead_alloc_map · Issue #55287 · rust-lang/rust