This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Need help to correct vla-dealloc testcase
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Andrew Hutchinson <andrewhutchinson at cox dot net>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Sun, 6 Dec 2009 17:55:41 +0000 (UTC)
- Subject: Re: Need help to correct vla-dealloc testcase
- References: <4B1BCED9.9080709@cox.net>
On Sun, 6 Dec 2009, Andrew Hutchinson wrote:
> The test appears to be unsafe. The original fault was failure to deallocate
> VLA on the jump - thus with the fault present the test would appear to perform
> 1 million new allocation - and fail presumably due to either execution time or
> run time error - neither of which seem certian.
It's expected to run into RLIMIT_STACK or equivalent, with an expectation
that stack limits are generally below 500MB. (A million executions of a
few instructions should be pretty fast in general.)
> b) I could change n to be 32 bit on 16 bit targets (the test will then be
> equally uncertain on 16 bit targets at detecting fault.)
This seems to be the natural approach.
--
Joseph S. Myers
joseph@codesourcery.com