[llvm-commits] [llvm-gcc-4.2] r74569 - /llvm-gcc-4.2/trunk/gcc/config/darwin-c.c
Dale Johannesen
dalej at apple.com
Tue Jun 30 16:10:22 PDT 2009
Author: johannes
Date: Tue Jun 30 18:10:22 2009
New Revision: 74569
URL: http://llvm.org/viewvc/llvm-project?rev=74569&view=rev
Log:
Detect an error cleanly instead of crashing.
Modified:
llvm-gcc-4.2/trunk/gcc/config/darwin-c.c
Modified: llvm-gcc-4.2/trunk/gcc/config/darwin-c.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/darwin-c.c?rev=74569&r1=74568&r2=74569&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/darwin-c.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/darwin-c.c Tue Jun 30 18:10:22 2009
@@ -1161,6 +1161,14 @@
argument = TREE_CHAIN (argument);
}
+ /* APPLE LOCAL begin 7020016 */
+ if (argument == NULL_TREE)
+ {
+ error ("argument number of CFString format too large");
+ *no_add_attrs = true;
+ return false;
+ }
+ /* APPLE LOCAL end 7020016 */
if (!objc_check_cfstringref_type (TREE_VALUE (argument)))
{
error ("format CFString argument not an 'CFStringRef' type");
More information about the llvm-commits
mailing list