lambdaclass/cairo_native

nullable snapshot_take is incorrectly implemented

edg-l opened this issue · 0 comments

Example program segfaulting

use core::array::ArrayTrait;
use core::NullableTrait;

fn main() -> @Nullable<Array<felt252>> {
    let mut x = NullableTrait::new(array![1, 2, 3]);
    let x_s = @x;

    let mut y = NullableTrait::deref(x);
    y.append(4);

    x_s
}

Working on this here #718