You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The run resulted in a panic, returning the error data.
let err_data_start = values[values.len() - 2].to_usize().unwrap();
let err_data_end = values[values.len() - 1].to_usize().unwrap();
RunResultValue::Panic(
cells[err_data_start..err_data_end]
.iter()
.cloned()
.map(Option::unwrap)
.collect(),
)
}
}else{
// No panic wrap - so always successful.
RunResultValue::Success(values)
}
}
Where a println! would print: [1, 2, 3, 420], the returned values are [0x1e50, 0x1e50, 0x225b312c20322c20332c203432305d22, 0x10]
It seems that bytearrays, and in general, any pointer-based struct, cannot be returned.
Expected behavior:
This should return the serialized bytearray representation for the above, which would be [0, 0x225b312c20322c20332c203432305d22, 0x10]
The text was updated successfully, but these errors were encountered:
what are you trying to use it for?
note that this is a structure for only for debug and test runs for the time being - not for actual provable calculation.
A custom test runner. I use cairo-run to output JSON representations of my types as bytearrays. The goal is to use this test runner for property testing / diff testing
Bug Report
Cairo version:
2.8.4
Current behavior:
cairo/crates/cairo-lang-runner/src/lib.rs
Lines 480 to 509 in d7813fb
Where a
println!
would print:[1, 2, 3, 420]
, the returned values are[0x1e50, 0x1e50, 0x225b312c20322c20332c203432305d22, 0x10]
It seems that bytearrays, and in general, any pointer-based struct, cannot be returned.
Expected behavior:
This should return the serialized bytearray representation for the above, which would be
[0, 0x225b312c20322c20332c203432305d22, 0x10]
The text was updated successfully, but these errors were encountered: