This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] ubsan: Do not run the testsuite if ubsan does not work at all
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: Segher Boessenkool <segher at kernel dot crashing dot org>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 6 Jan 2015 13:09:14 +0100
- Subject: Re: [PATCH] ubsan: Do not run the testsuite if ubsan does not work at all
- Authentication-results: sourceware.org; auth=none
- References: <794f294d0fe7dd3f95e2b05875619307538a9b7f dot 1419462987 dot git dot segher at kernel dot crashing dot org> <1600935 dot WazoELDGJf at polaris>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jan 06, 2015 at 01:04:29PM +0100, Eric Botcazou wrote:
> > I normally build with --disable-libsanitizer, because the sanitizers
> > testresults are very unreproducable, so just annoying noise. This however
> > makes most (all?) ubsan testcases fail, since they want to load a shared
> > library that does not exist.
>
> Same here, but I also have the problem with tsan testcases.
>
> > gcc/testsuite/
> > * lib/ubsan-dg.exp (check_effective_target_fsanitize_undefined):
> > Check if testcases run without errors, not just if they compile.
>
> I additionally need:
>
> * lib/tsan-dg.exp (check_effective_target_fsanitize_thread):
> Check if testcases run without errors, not just if they compile.
What errors do you get? Just curious. That said, I think your patch is fine.
> --- lib/tsan-dg.exp (revision 219217)
> +++ lib/tsan-dg.exp (working copy)
> @@ -18,7 +18,7 @@
> # code, 0 otherwise.
>
> proc check_effective_target_fsanitize_thread {} {
> - return [check_no_compiler_messages fsanitize_thread executable {
> + return [check_runtime fsanitize_thread {
> int main (void) { return 0; }
> } "-fsanitize=thread"]
> }
Jakub