This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc stack-smashing protector (for gcc-3.2.1)


On Fri, 10 Jan 2003, Fergus Henderson wrote:

> A simple way to do that would be to add a rule to the Makefile that
> checks for such things, e.g. using grep.
> For example:
> 
> 	check: check_sources
> 
> 	.PHONY: check_sources
> 	check_sources:
> 		if fgrep -n "`cat POISONED_WORDS`" *.c *.h 1>&2; then
> 			echo "The lines above contain poisoned words" 1>&2
> 			exit 1
> 		fi

Some words it's useful to grep for also have legitimate uses, e.g.
grepping for "675" finds notices with the old FSF address, but also some
long tables of numbers.

-- 
Joseph S. Myers
jsm28@cam.ac.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]