This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, i386, MPX, 3/X] MPX tests
- From: Mike Stump <mikestump at comcast dot net>
- To: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 19 Nov 2013 17:07:11 -0800
- Subject: Re: [PATCH, i386, MPX, 3/X] MPX tests
- Authentication-results: sourceware.org; auth=none
- References: <20131119205849 dot GX21297 at msticlxl57 dot ims dot intel dot com> <Pine dot LNX dot 4 dot 64 dot 1311192156430 dot 8742 at digraph dot polyomino dot org dot uk> <CAMbmDYZHMmXdgZi+0Y3mUQikwWFP7JPgm8j-dZThEkAoKqHBDQ at mail dot gmail dot com>
On Nov 19, 2013, at 2:05 PM, Ilya Enkovich <firstname.lastname@example.org> wrote:
>> Anything added that's XFAILed should have a comment explaining the reason
>> for the XFAILing (a reference to a bug in GCC Bugzilla is a good idea,
>> with that bug then mentioning the particular test that indicates whether
>> the bug is still present).
> Tests fail not due to the bug but because these tests should fail.
> It would mean bound violation was detected.
You should have a way to have a bound violation turn into a PASS:.
For example, if you have fork or threads, you could fork or create a thread and notice in the other that the spawned routine failed (didn't complete normally) and then exit(0) it, else exit(1) it. not pretty, but if you hide this behind a macro, should be easy to maintain (or switch, if someone finds a better way to do it). If you have a probe primitive to ask the question, will this be a valid access, you could switch to using that primitive instead.