Open Tassle opened 9 months ago
I don't have a M1 Mac env now. It's likely the debug version stack alignment issue. E.g.
I don't have a M1 Mac env now. It's likely the debug version stack alignment issue. E.g.
it might be a stack overflow error
@Tassle could please test the master in your env again?
@Tassle could please test the master in your env again?
works fine on my Mac.
use generator::{Generator, Gn, done};
use rand::{thread_rng, Rng};
fn simple_generator<'a>() -> Generator<'a, (), i32>{
Gn::new_scoped(move |mut s| {
let v: i32 = thread_rng().gen();
s.yield_(v);
done!();
})
}
fn main() {
assert!(catch_unwind(|| {
for v in simple_generator(){
println!("{}", v);
}
}).is_err());
}
coroutine in thread 'main' has overflowed its stack
Process finished with exit code 0
sysctl -n machdep.cpu.brand_string
Apple M3 Pro
When running the following program in debug mode, I get a bus error.
It runs fine in release mode, or when there is no thread_rng involved.
I'm on an M1 Mac, Ventura 13.0.1. Stable Rust (1.72.0).