[all-commits] [llvm/llvm-project] d0edd9: [Coroutines] Mark parameter allocas with coro.outs...
Hans Wennborg via All-commits
all-commits at lists.llvm.org
Fri Feb 28 00:55:09 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d0edd931bcc328b9502289d346f2b2219341f853
https://github.com/llvm/llvm-project/commit/d0edd931bcc328b9502289d346f2b2219341f853
Author: Hans Wennborg <hans at hanshq.net>
Date: 2025-02-28 (Fri, 28 Feb 2025)
Changed paths:
M clang/lib/CodeGen/CGCoroutine.cpp
M clang/test/CodeGenCoroutines/coro-params.cpp
Log Message:
-----------
[Coroutines] Mark parameter allocas with coro.outside.frame metadata (#127653)
Parameters to a coroutine get copied (moved) to coroutine-local
instances which code inside the coroutine then uses.
The original parameters should not be part of the frame. Normally
CoroSplit figures that out by itself, but for [[clang::trivial_abi]]
parameters which, get destructed at the end of the ramp function, it
does not (see bug), causing use-after-free's if the frame is destroyed
before the end of the ramp (as happens if it doesn't suspend).
Since Clang knows these should never be part of the frame, use metadata
to make it so.
Fixes #127499
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list