diff mbox

ubsan: Do not run the testsuite if ubsan does not work at all

Message ID 1600935.WazoELDGJf@polaris
State New
Headers show

Commit Message

Eric Botcazou Jan. 6, 2015, 12:04 p.m. UTC
> 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.

Comments

Jakub Jelinek Jan. 6, 2015, 12:09 p.m. UTC | #1
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
Eric Botcazou Jan. 6, 2015, 12:20 p.m. UTC | #2
> What errors do you get?  Just curious.

Something along of "cannot load libtsan.so.0" and this comes from PR 58867.

> That said, I think your patch is fine.

Thanks, installed after testing on x86-64/Linux.
Segher Boessenkool Jan. 6, 2015, 2:20 p.m. UTC | #3
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.

That already exited early for me because -ltsan couldn't be found.
Probably because I started using --disable-libsanitizer before tsan
existed, so it cannot be found in my install dir (which is the _old_
version in any case, I didn't run "make install" yet, but it is
still searching there for the compile test).


Segher
diff mbox

Patch

Index: lib/tsan-dg.exp
===================================================================
--- 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"]
 }