Skip to content

Invalid Rc/RefCell borrow when having a Gc pointer inside #11532

Closed
@kvark

Description

@kvark
fn main()   {
    use std::{cell,gc,rc};
    let a = rc::Rc::new(cell::RefCell::new( gc::Gc::new(1) ));
    assert!(a.borrow().try_borrow_mut().is_some());
}

Expected output = none.
Actual output:

task '<main>' failed at 'assertion failed: a.borrow().try_borrow_mut().is_some()', test.rs:4
failed at 'assertion failed: self.live_allocs.is_null()', /mnt/code/claymore/rust/src/libstd/rt/local_heap.rs:138
Illegal instruction (core dumped)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions