[PATCH] D49718: [CodeGen][ObjC] Make block copy/dispose helper function exception-safe.

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 23 22:04:02 PDT 2018


ahatanak created this revision.
ahatanak added a reviewer: rjmccall.
Herald added a subscriber: dexonsmith.

Block copy/dispose helper functions currently aren’t exception-safe. When an exception is thrown in a copy function, the function exits without destroying or releasing C++ objects, ObjC objects, and `__block` objects that have already been copied. Similarly, dispose functions don't release ObjC objects and `__block objects` that are yet to be released when an exception is thrown.


Repository:
  rC Clang

https://reviews.llvm.org/D49718

Files:
  lib/CodeGen/CGBlocks.cpp
  test/CodeGenObjCXX/arc-blocks.mm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49718.156967.patch
Type: text/x-patch
Size: 16265 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180724/9f490c07/attachment-0001.bin>


More information about the cfe-commits mailing list