<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Ok. But please provide a test case. See <span style="font-family: Menlo; font-size: 11px;">builtin-object-size.c for some samples.</span><div><font face="Menlo"><span style="font-size: 11px;"><br></span></font></div><div><font face="Menlo"><span style="font-size: 11px;">- Fariborz</span></font></div><div><font face="Menlo"><span style="font-size: 11px;"><br></span></font><div><br><div><div>On Sep 23, 2014, at 4:03 PM, Steven Wu <<a href="mailto:stevenwu@apple.com">stevenwu@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Fix an assertion failure in CheckBuiltinFunctionCall.<br>memccpy_chk should have source and dest size at arg 3 and 4.<br><br>---<br> lib/Sema/SemaChecking.cpp | 4 +++-<br> 1 file changed, 3 insertions(+), 1 deletion(-)<br><br>diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp<br>index 7462869..5ea862c 100644<br>--- a/lib/Sema/SemaChecking.cpp<br>+++ b/lib/Sema/SemaChecking.cpp<br>@@ -365,7 +365,6 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,<br> // check secure string manipulation functions where overflows<br> // are detectable at compile time<br> case Builtin::BI__builtin___memcpy_chk:<br>- case Builtin::BI__builtin___memccpy_chk:<br> case Builtin::BI__builtin___memmove_chk:<br> case Builtin::BI__builtin___memset_chk:<br> case Builtin::BI__builtin___strlcat_chk:<br>@@ -375,6 +374,9 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,<br> case Builtin::BI__builtin___stpncpy_chk:<br> SemaBuiltinMemChkCall(*this, FDecl, TheCall, 2, 3);<br> break;<br>+ case Builtin::BI__builtin___memccpy_chk:<br>+ SemaBuiltinMemChkCall(*this, FDecl, TheCall, 3, 4);<br>+ break;<br> case Builtin::BI__builtin___snprintf_chk:<br> case Builtin::BI__builtin___vsnprintf_chk:<br> SemaBuiltinMemChkCall(*this, FDecl, TheCall, 1, 3);<br><br><span><memccpy.patch></span><br><br></blockquote></div><br></div></div></body></html>