[cfe-commits] r142531 - in /cfe/trunk: include/clang/Basic/Builtins.def test/Analysis/security-syntax-checks.m

Douglas Gregor dgregor at apple.com
Wed Oct 19 13:18:10 PDT 2011


This is important. Bill, please merge to the release branch.

	- Doug

On Oct 19, 2011, at 7:50 AM, Rafael Espindola wrote:

> Author: rafael
> Date: Wed Oct 19 09:50:34 2011
> New Revision: 142531
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=142531&view=rev
> Log:
> Fix the signatures of vfork, __sigsetjmp and sigsetjmp.
> 
> Patch by Dimitry Andric.
> 
> Modified:
>    cfe/trunk/include/clang/Basic/Builtins.def
>    cfe/trunk/test/Analysis/security-syntax-checks.m
> 
> Modified: cfe/trunk/include/clang/Basic/Builtins.def
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Builtins.def?rev=142531&r1=142530&r2=142531&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/Builtins.def (original)
> +++ cfe/trunk/include/clang/Basic/Builtins.def Wed Oct 19 09:50:34 2011
> @@ -673,16 +673,16 @@
> LIBBUILTIN(bzero, "vv*z",         "f",     "strings.h", ALL_LANGUAGES)
> // POSIX unistd.h
> LIBBUILTIN(_exit, "vi",           "fr",    "unistd.h", ALL_LANGUAGES)
> -LIBBUILTIN(vfork, "iJ",           "fj",    "unistd.h", ALL_LANGUAGES)
> +LIBBUILTIN(vfork, "i",            "fj",    "unistd.h", ALL_LANGUAGES)
> // POSIX setjmp.h
> 
> // In some systems setjmp is a macro that expands to _setjmp. We undefine
> // it here to avoid having two identical LIBBUILTIN entries.
> #undef setjmp
> LIBBUILTIN(_setjmp, "iJ",         "fj",   "setjmp.h", ALL_LANGUAGES)
> -LIBBUILTIN(__sigsetjmp, "iJ",     "fj",   "setjmp.h", ALL_LANGUAGES)
> +LIBBUILTIN(__sigsetjmp, "iJi",    "fj",   "setjmp.h", ALL_LANGUAGES)
> LIBBUILTIN(setjmp, "iJ",          "fj",   "setjmp.h", ALL_LANGUAGES)
> -LIBBUILTIN(sigsetjmp, "iJ",       "fj",   "setjmp.h", ALL_LANGUAGES)
> +LIBBUILTIN(sigsetjmp, "iJi",      "fj",   "setjmp.h", ALL_LANGUAGES)
> LIBBUILTIN(setjmp_syscall, "iJ",  "fj",   "setjmp.h", ALL_LANGUAGES)
> LIBBUILTIN(savectx, "iJ",         "fj",   "setjmp.h", ALL_LANGUAGES)
> LIBBUILTIN(qsetjmp, "iJ",         "fj",   "setjmp.h", ALL_LANGUAGES)
> 
> Modified: cfe/trunk/test/Analysis/security-syntax-checks.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/security-syntax-checks.m?rev=142531&r1=142530&r2=142531&view=diff
> ==============================================================================
> --- cfe/trunk/test/Analysis/security-syntax-checks.m (original)
> +++ cfe/trunk/test/Analysis/security-syntax-checks.m Wed Oct 19 09:50:34 2011
> @@ -170,7 +170,7 @@
> //===----------------------------------------------------------------------===
> typedef int __int32_t;
> typedef __int32_t pid_t;
> -pid_t vfork(void); //expected-warning{{declaration of built-in function 'vfork' requires inclusion of the header <setjmp.h>}}
> +pid_t vfork(void);
> 
> void test_vfork() {
>   vfork(); //expected-warning{{Call to function 'vfork' is insecure as it can lead to denial of service situations in the parent process.}}
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list