<div dir="ltr"><div><div><div><div><div><div>My frontend is emitting an array (here called %error_return_trace_addresses). You can see we take the address of the first element and store it <br><br>; Function Attrs: nobuiltin noinline nounwind optnone<br>define internal fastcc i8* @failing(%StackTrace* nonnull, %Allocator*, i16*) unnamed_addr #3 !dbg !273 {<br>Entry:<br>  %error_return_trace_addresses = alloca [1 x i64], align 8<br>  %error_return_trace = alloca %StackTrace, align 8<br>  %3 = alloca i8*, align 8<br>  %4 = alloca %"[]u8", align 8<br>  %5 = getelementptr inbounds %StackTrace, %StackTrace* %error_return_trace, i32 0, i32 0<br>  store i64 0, i64* %5, align 8<br>  %6 = getelementptr inbounds %StackTrace, %StackTrace* %error_return_trace, i32 0, i32 1<br>  %7 = getelementptr inbounds %"[]usize", %"[]usize"* %6, i32 0, i32 0<br>  %8 = getelementptr inbounds [1 x i64], [1 x i64]* %error_return_trace_addresses, i64 0, i64 0<br>  store i64* %8, i64** %7, align 8<br><br><br></div>however CoroSplit does not spill it.<br><br></div>we write through the pointer, which writes to the fn stack data.<br></div>then there is a suspend point, and the data becomes corrupt.<br></div>then we read through the pointer and get corrupt data.<br></div>this is because %error_return_trace_addresses should be spilled.<br><br></div>is there a way for a frontend to explicitly require an alloca to be spilled? perhaps putting it as a field in the promise alloca?<br></div>