Skip to content
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 with validation disabled #754

Closed
RalfJung opened this issue May 31, 2019 · 2 comments · Fixed by rust-lang/rust#61404 or #757
Closed

ICE with validation disabled #754

RalfJung opened this issue May 31, 2019 · 2 comments · Fixed by rust-lang/rust#61404 or #757
Assignees
Labels
A-interpreter Area: affects the core interpreter C-bug Category: This is a bug.

Comments

@RalfJung
Copy link
Member

RalfJung commented May 31, 2019

The following test passes normally but ICEs when validation gets disabled:

use std::cell::*;

fn main() {
    let cell: RefCell<[i32; 3]> = RefCell::new([1, 2, 3]);
    {
        let mut cellref: RefMut<'_, [i32; 3]> = cell.borrow_mut();
        cellref[0] = 4;
        let mut coerced: RefMut<'_, [i32]> = cellref;
        coerced[2] = 5;
    }
    {
        let comp: &mut [i32] = &mut [4, 2, 5];
        let cellref: Ref<'_, [i32; 3]> = cell.borrow();
        assert_eq!(&*cellref, comp);
        let coerced: Ref<'_, [i32]> = cellref;
        assert_eq!(&*coerced, comp);
    }
}

We don't test -Zmiri-disable-validation very much. But we also cannot test every flag...

@RalfJung RalfJung self-assigned this May 31, 2019
@oli-obk
Copy link
Contributor

oli-obk commented May 31, 2019 via email

@RalfJung
Copy link
Member Author

I might have CI time budget to run at least some of the libstd test suites without validation on #754.

Centril added a commit to Centril/rust that referenced this issue Jun 4, 2019
miri unsizing: fix projecting into a field of an operand

I don't know why this open-coded an operand field projection. Probably this code predates one or more of my refactorings.

Fixes rust-lang/miri#754

r? @oli-obk
Centril added a commit to Centril/rust that referenced this issue Jun 4, 2019
miri unsizing: fix projecting into a field of an operand

I don't know why this open-coded an operand field projection. Probably this code predates one or more of my refactorings.

Fixes rust-lang/miri#754

r? @oli-obk
Centril added a commit to Centril/rust that referenced this issue Jun 4, 2019
miri unsizing: fix projecting into a field of an operand

I don't know why this open-coded an operand field projection. Probably this code predates one or more of my refactorings.

Fixes rust-lang/miri#754

r? @oli-obk
@RalfJung RalfJung added A-interpreter Area: affects the core interpreter C-bug Category: This is a bug. labels Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-interpreter Area: affects the core interpreter C-bug Category: This is a bug.
Projects
None yet
2 participants