Skip to content

Commit 9b42803

Browse files
committed
LLVMCodeBuilder: Do not free strings before suspending
They're freed when the thread is destroyed.
1 parent f19c0d4 commit 9b42803

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/engine/internal/llvm/llvmcodebuilder.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,6 @@ std::shared_ptr<ExecutableCode> LLVMCodeBuilder::finalize()
10221022
}
10231023

10241024
case LLVMInstruction::Type::Yield:
1025-
// TODO: Do not allow use after suspend (use after free)
10261025
createSuspend(coro.get(), warpArg, targetVariables);
10271026
break;
10281027

@@ -3167,7 +3166,6 @@ void LLVMCodeBuilder::createSuspend(LLVMCoroutine *coro, llvm::Value *warpArg, l
31673166
m_builder.SetInsertPoint(suspendBranch);
31683167
}
31693168

3170-
freeScopeHeap();
31713169
syncVariables(targetVariables);
31723170
coro->createSuspend();
31733171
reloadVariables(targetVariables);

0 commit comments

Comments
 (0)