Subject: Re: sanity checking arguments to library functions...
To: Brian C. Grayson <bgrayson@orac.ece.utexas.edu>
From: Simon Burge <simonb@netbsd.org>
List: tech-userlevel
Date: 04/21/1999 09:39:11
"Brian C. Grayson" wrote:

>   Enclosed (as a MIME attachment) is a simple C program that
> tries to detect whether the builtin-method will work for a
> given machine.  I've tested it out on x86, which is the only
> NetBSD arch I have access to.  This is a quick hack, so no
> guarantees.....  :)

Just a quick report:

	mona:~ 4> cc -o simpletest simpletest.c 
	simpletest.c: In function `RetAddrOkay':
	simpletest.c:87: warning: unsupported arg to `__builtin_return_address'
	simpletest.c:88: warning: unsupported arg to `__builtin_return_address'
	simpletest.c:89: warning: unsupported arg to `__builtin_return_address'
	simpletest.c:90: warning: unsupported arg to `__builtin_return_address'
	simpletest.c:91: warning: unsupported arg to `__builtin_return_address'
	simpletest.c:92: warning: unsupported arg to `__builtin_return_address'
	mona:~ 5> ./simpletest 
	Segmentation fault (core dumped)
	Exit 139

I'll look into this a bit more later if you have no bright ideas :-)

Simon.