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
//minified repro samplefnrec_func_wrapper(n:i32) -> i32{// an @ for rec_func() does not trigger the assertion, but causes full unrolling of the recursionfnrec_func(x:i32) -> i32{if x == 0{1}else{let buffer = alloc_cpu(sizeof[i32]());let data = buffer.dataas&mut[i32];// removing the threading logic and computing rec_func(x-1) directly does not show the issuelet task = spawn(|| {data(0) = rec_func(x-1);});let tid = task();sync(tid);let result = data(0);release(buffer);if result > 0{1}else{0}}}rec_func(n)}#[export]fnmain() -> i32{let t = rec_func_wrapper(5);if t > 0{0}else{ -1}}
triggers Assertion failed: odef->op(i) != odef, file D:\Projects\anydsl\thorin\src\thorin\transform\importer.cpp, line 80
and in previous versions of thorin this ended up with a stack overflow.
The text was updated successfully, but these errors were encountered:
triggers
Assertion failed: odef->op(i) != odef, file D:\Projects\anydsl\thorin\src\thorin\transform\importer.cpp, line 80
and in previous versions of thorin this ended up with a stack overflow.
The text was updated successfully, but these errors were encountered: