[cfe-commits] [patch] Obj-C rewriter uses deallocated string

Eric Niebler eric at boostpro.com
Wed Apr 20 03:51:17 PDT 2011


The new Obj-C rewriter is failing to flush a raw_string_ostream before
using its results. Due to the destruction order of locals, it's causing
a deallocated string to be used, leading to junk characters being
written out. The problem was found on Windows.

The attached patch corrects the problem by adding the missing calls to
flush.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: objcrewriter.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110420/e7075f0b/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 551 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110420/e7075f0b/attachment.sig>


More information about the cfe-commits mailing list