Add regression tests to check whether GCC folds unsafe builtins and
authormartynas <martynas@openbsd.org>
Sat, 28 Dec 2013 02:14:32 +0000 (02:14 +0000)
committermartynas <martynas@openbsd.org>
Sat, 28 Dec 2013 02:14:32 +0000 (02:14 +0000)
commite6e6dad3324a03134a8814e18ccd61c3a7190a0a
tree4540592996dcd13a94f26dcf2b0b0a04b201490c
parent0ad647d636da2a68f3f0c25a1c97d5e3d42368b2
Add regression tests to check whether GCC folds unsafe builtins and
actually shows the security warning.  Also add some other cases
where GCC used to yield the warning but shouldn't (e.g. strncat
simplified into strcat).
28 files changed:
regress/gnu/egcs/Makefile
regress/gnu/egcs/gcc-builtins/Makefile [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/sprintf-1.c [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/sprintf-1.c.exp [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/sprintf-2.c [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/sprintf-2.c.exp [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/sprintf-3.c [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/sprintf-3.c.exp [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/stpcpy-1.c [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/stpcpy-1.c.exp [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/stpcpy-2.c [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/stpcpy-2.c.exp [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/strcat-1.c [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/strcat-1.c.exp [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/strcat-2.c [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/strcat-2.c.exp [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/strcpy-1.c [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/strcpy-1.c.exp [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/strcpy-2.c [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/strcpy-2.c.exp [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/strncat-1.c [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/strncat-1.c.exp [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/vsprintf-1.c [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/vsprintf-1.c.exp [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/vsprintf-2.c [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/vsprintf-2.c.exp [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/vsprintf-3.c [new file with mode: 0644]
regress/gnu/egcs/gcc-builtins/vsprintf-3.c.exp [new file with mode: 0644]