[all-commits] [llvm/llvm-project] caa1eb: Don't assume that a new cleanup was added to Inner...
James Y Knight via All-commits
all-commits at lists.llvm.org
Fri Feb 4 20:40:55 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: caa1ebde70673ddb7124a0599ba846362a1f8b1e
https://github.com/llvm/llvm-project/commit/caa1ebde70673ddb7124a0599ba846362a1f8b1e
Author: James Y Knight <jyknight at google.com>
Date: 2022-02-04 (Fri, 04 Feb 2022)
Changed paths:
M clang/lib/CodeGen/CGCall.cpp
M clang/test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp
Log Message:
-----------
Don't assume that a new cleanup was added to InnermostEHScope.
After fa87fa97fb79, this was no longer guaranteed to be the cleanup
just added by this code, if IsEHCleanup got disabled. Instead, use
stable_begin(), which _is_ guaranteed to be the cleanup just added.
This caused a crash when a object that is callee destroyed (e.g. with the MS ABI) was passed in a call from a noexcept function.
Added a test to verify.
Fixes: fa87fa97fb79
More information about the All-commits
mailing list