public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] c/c++ asan tests for FreeBSD
@ 2015-11-29 20:03 Andreas Tobler
  2015-11-29 22:10 ` Andreas Tobler
  2015-11-30 10:32 ` Bernd Schmidt
  0 siblings, 2 replies; 7+ messages in thread
From: Andreas Tobler @ 2015-11-29 20:03 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

Hi all,

the attached patch prepares the testsuite, c and c++, for the upcoming 
ASAN support for FreeBSD (x86_64 first).

I tested the patch on CentOS7.1 x86_64 and on FreeBSD x86_64.
Results can be seen on the list.

Is this ok for trunk?

Thanks,
Andreas

2015-11-29  Andreas Tobler  <andreast@gcc.gnu.org>

	* c-c++-common/asan/no-asan-stack.c: Add x86_64-*-freebsd*.
	* c-c++-common/asan/asan-interface-1.c: Add *-*-freebsd*.
	* c-c++-common/asan/pr59063-1.c: Likewise.
	* c-c++-common/asan/pr59063-2.c: Likewise.
	* g++.dg/asan/asan_test.C: Add *-*-freebsd* and x86_64-*-freebsd*
	where needed.
	Move the -ldl addtional-option to a new line, used for all non
	FreeBSD targets.
	* g++.dg/asan/asan_test_utils.h: Include the <unistd.h> for __linux__
	and __FreeBSD__.
	* g++.dg/asan/interception-failure-test-1.C: Add *-*-freebsd*.
	* g++.dg/asan/interception-malloc-test-1.C: Likewise.
	* g++.dg/asan/interception-test-1.C: Likewise.

[-- Attachment #2: asan-tests-freebsd.diff --]
[-- Type: text/plain, Size: 5626 bytes --]

Index: c-c++-common/asan/asan-interface-1.c
===================================================================
--- c-c++-common/asan/asan-interface-1.c	(revision 231047)
+++ c-c++-common/asan/asan-interface-1.c	(working copy)
@@ -1,6 +1,6 @@
 /* Check that interface headers work. */
 
-/* { dg-do run { target { *-*-linux* } } } */
+/* { dg-do run { target { *-*-linux* *-*-freebsd* } } } */
 
 #include <sanitizer/asan_interface.h>
 
Index: c-c++-common/asan/no-asan-stack.c
===================================================================
--- c-c++-common/asan/no-asan-stack.c	(revision 231047)
+++ c-c++-common/asan/no-asan-stack.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* } && lp64 } } } */
+/* { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* x86_64-*-freebsd* } && lp64 } } } */
 /* { dg-options "--param asan-stack=0" } */
 #include <string.h>
 
Index: c-c++-common/asan/pr59063-1.c
===================================================================
--- c-c++-common/asan/pr59063-1.c	(revision 231047)
+++ c-c++-common/asan/pr59063-1.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do run { target { *-*-linux* } } } */
+/* { dg-do run { target { *-*-linux* *-*-freebsd* } } } */
 
 #include <time.h>
 static int weak_gettime (clockid_t clk_id, struct timespec *tp)
Index: c-c++-common/asan/pr59063-2.c
===================================================================
--- c-c++-common/asan/pr59063-2.c	(revision 231047)
+++ c-c++-common/asan/pr59063-2.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do run { target { *-*-linux* } } } */
+/* { dg-do run { target { *-*-linux* *-*-freebsd* } } } */
 /* { dg-options "-static-libasan" } */
 
 #include <time.h>
Index: g++.dg/asan/asan_test.C
===================================================================
--- g++.dg/asan/asan_test.C	(revision 231047)
+++ g++.dg/asan/asan_test.C	(working copy)
@@ -1,13 +1,14 @@
-// { dg-do run { target { { i?86-*-linux* x86_64-*-linux* } && sse2_runtime } } }
+// { dg-do run { target { { i?86-*-linux* x86_64-*-linux* x86_64-*-freebsd* } && sse2_runtime } } }
 // { dg-skip-if "" { *-*-* } { "*" } { "-O2" } }
 // { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
 // { dg-additional-sources "asan_globals_test-wrapper.cc" }
-// { dg-options "-std=c++11 -fsanitize=address -fno-builtin -Wall -Wno-format -Werror -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DSANITIZER_USE_DEJAGNU_GTEST=1 -lasan -lpthread -ldl" }
+// { dg-options "-std=c++11 -fsanitize=address -fno-builtin -Wall -Wno-format -Werror -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DSANITIZER_USE_DEJAGNU_GTEST=1 -lasan -lpthread" }
+// { dg-additional-options "-ldl" { target { ! *-*-freebsd* } } }
 // { dg-additional-options "-DASAN_NEEDS_SEGV=1" { target { ! arm*-*-* } } }
 // { dg-additional-options "-DASAN_LOW_MEMORY=1 -DASAN_NEEDS_SEGV=0" { target arm*-*-* } }
 // { dg-additional-options "-DASAN_AVOID_EXPENSIVE_TESTS=1" { target { ! run_expensive_tests } } }
-// { dg-additional-options "-msse2" { target { i?86-*-linux* x86_64-*-linux* } } }
-// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
+// { dg-additional-options "-msse2" { target { i?86-*-linux* x86_64-*-linux* x86_64-*-freebsd* } } }
+// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu *-*-freebsd* } } }
 // { dg-final { asan-gtest } }
 
 #include "asan_test.cc"
Index: g++.dg/asan/asan_test_utils.h
===================================================================
--- g++.dg/asan/asan_test_utils.h	(revision 231047)
+++ g++.dg/asan/asan_test_utils.h	(working copy)
@@ -40,6 +40,9 @@
 # include <sys/types.h>
 # include <sys/stat.h>
 # include <fcntl.h>
+#endif
+
+#if defined(__linux__) || defined(__FreeBSD__)
 #include <unistd.h>
 #endif
 
Index: g++.dg/asan/interception-failure-test-1.C
===================================================================
--- g++.dg/asan/interception-failure-test-1.C	(revision 231047)
+++ g++.dg/asan/interception-failure-test-1.C	(working copy)
@@ -3,7 +3,7 @@
 
 // { dg-do run }
 // { dg-options "-fno-builtin-malloc -fno-builtin-free" }
-// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
+// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu *-*-freebsd* } } }
 
 #include <stdlib.h>
 #include <stdio.h>
Index: g++.dg/asan/interception-malloc-test-1.C
===================================================================
--- g++.dg/asan/interception-malloc-test-1.C	(revision 231047)
+++ g++.dg/asan/interception-malloc-test-1.C	(working copy)
@@ -1,8 +1,8 @@
 // ASan interceptor can be accessed with __interceptor_ prefix.
 
-// { dg-do run { target *-*-linux* } }
+// { dg-do run { target *-*-linux* *-*-freebsd* } }
 // { dg-options "-fno-builtin-free" }
-// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
+// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu *-*-freebsd* } } }
 // { dg-shouldfail "asan" }
 
 #include <stdlib.h>
Index: g++.dg/asan/interception-test-1.C
===================================================================
--- g++.dg/asan/interception-test-1.C	(revision 231047)
+++ g++.dg/asan/interception-test-1.C	(working copy)
@@ -2,7 +2,7 @@
 
 // { dg-do run }
 // { dg-options "-fno-builtin-malloc -fno-builtin-free" }
-// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
+// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu *-*-freebsd* } } }
 // { dg-shouldfail "asan" }
 // { dg-skip-if "Darwin uses mac function interposition" { *-*-darwin* } }
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch] c/c++ asan tests for FreeBSD
  2015-11-29 20:03 [patch] c/c++ asan tests for FreeBSD Andreas Tobler
@ 2015-11-29 22:10 ` Andreas Tobler
  2015-11-30 10:32 ` Bernd Schmidt
  1 sibling, 0 replies; 7+ messages in thread
From: Andreas Tobler @ 2015-11-29 22:10 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 1112 bytes --]

On 29.11.15 20:32, Andreas Tobler wrote:
> Hi all,
>
> the attached patch prepares the testsuite, c and c++, for the upcoming
> ASAN support for FreeBSD (x86_64 first).
>
> I tested the patch on CentOS7.1 x86_64 and on FreeBSD x86_64.
> Results can be seen on the list.
>
> Is this ok for trunk?

Aehm, an add-on, i?86 works also.

ChangeLog changed and g++.dg/asan/asan_test.C modified.

Ok?

Thanks,
Andreas


2015-11-29  Andreas Tobler  <andreast@gcc.gnu.org>

	* c-c++-common/asan/no-asan-stack.c: Add x86_64-*-freebsd*.
	* c-c++-common/asan/asan-interface-1.c: Add *-*-freebsd*.
	* c-c++-common/asan/pr59063-1.c: Likewise.
	* c-c++-common/asan/pr59063-2.c: Likewise.
	* g++.dg/asan/asan_test.C: Add *-*-freebsd*, i?86-*-freebsd* and
	x86_64-*-freebsd* where needed.
	Move the -ldl addtional-option to a new line, used for all non
	FreeBSD targets.
	* g++.dg/asan/asan_test_utils.h: Include the <unistd.h> for __linux__
	and __FreeBSD__.
	* g++.dg/asan/interception-failure-test-1.C: Add *-*-freebsd*.
	* g++.dg/asan/interception-malloc-test-1.C: Likewise.
	* g++.dg/asan/interception-test-1.C: Likewise.




[-- Attachment #2: asan-tests-freebsd-1.diff --]
[-- Type: text/plain, Size: 5656 bytes --]

Index: c-c++-common/asan/asan-interface-1.c
===================================================================
--- c-c++-common/asan/asan-interface-1.c	(revision 231047)
+++ c-c++-common/asan/asan-interface-1.c	(working copy)
@@ -1,6 +1,6 @@
 /* Check that interface headers work. */
 
-/* { dg-do run { target { *-*-linux* } } } */
+/* { dg-do run { target { *-*-linux* *-*-freebsd* } } } */
 
 #include <sanitizer/asan_interface.h>
 
Index: c-c++-common/asan/no-asan-stack.c
===================================================================
--- c-c++-common/asan/no-asan-stack.c	(revision 231047)
+++ c-c++-common/asan/no-asan-stack.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* } && lp64 } } } */
+/* { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* x86_64-*-freebsd* } && lp64 } } } */
 /* { dg-options "--param asan-stack=0" } */
 #include <string.h>
 
Index: c-c++-common/asan/pr59063-1.c
===================================================================
--- c-c++-common/asan/pr59063-1.c	(revision 231047)
+++ c-c++-common/asan/pr59063-1.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do run { target { *-*-linux* } } } */
+/* { dg-do run { target { *-*-linux* *-*-freebsd* } } } */
 
 #include <time.h>
 static int weak_gettime (clockid_t clk_id, struct timespec *tp)
Index: c-c++-common/asan/pr59063-2.c
===================================================================
--- c-c++-common/asan/pr59063-2.c	(revision 231047)
+++ c-c++-common/asan/pr59063-2.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do run { target { *-*-linux* } } } */
+/* { dg-do run { target { *-*-linux* *-*-freebsd* } } } */
 /* { dg-options "-static-libasan" } */
 
 #include <time.h>
Index: g++.dg/asan/asan_test.C
===================================================================
--- g++.dg/asan/asan_test.C	(revision 231047)
+++ g++.dg/asan/asan_test.C	(working copy)
@@ -1,13 +1,14 @@
-// { dg-do run { target { { i?86-*-linux* x86_64-*-linux* } && sse2_runtime } } }
+// { dg-do run { target { { i?86-*-linux* x86_64-*-linux* i?86-*freebsd* x86_64-*-freebsd* } && sse2_runtime } } }
 // { dg-skip-if "" { *-*-* } { "*" } { "-O2" } }
 // { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
 // { dg-additional-sources "asan_globals_test-wrapper.cc" }
-// { dg-options "-std=c++11 -fsanitize=address -fno-builtin -Wall -Wno-format -Werror -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DSANITIZER_USE_DEJAGNU_GTEST=1 -lasan -lpthread -ldl" }
+// { dg-options "-std=c++11 -fsanitize=address -fno-builtin -Wall -Wno-format -Werror -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DSANITIZER_USE_DEJAGNU_GTEST=1 -lasan -lpthread" }
+// { dg-additional-options "-ldl" { target { ! *-*-freebsd* } } }
 // { dg-additional-options "-DASAN_NEEDS_SEGV=1" { target { ! arm*-*-* } } }
 // { dg-additional-options "-DASAN_LOW_MEMORY=1 -DASAN_NEEDS_SEGV=0" { target arm*-*-* } }
 // { dg-additional-options "-DASAN_AVOID_EXPENSIVE_TESTS=1" { target { ! run_expensive_tests } } }
-// { dg-additional-options "-msse2" { target { i?86-*-linux* x86_64-*-linux* } } }
-// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
+// { dg-additional-options "-msse2" { target { i?86-*-linux* x86_64-*-linux* i?86-*freebsd* x86_64-*-freebsd* } } }
+// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu *-*-freebsd* } } }
 // { dg-final { asan-gtest } }
 
 #include "asan_test.cc"
Index: g++.dg/asan/asan_test_utils.h
===================================================================
--- g++.dg/asan/asan_test_utils.h	(revision 231047)
+++ g++.dg/asan/asan_test_utils.h	(working copy)
@@ -40,6 +40,9 @@
 # include <sys/types.h>
 # include <sys/stat.h>
 # include <fcntl.h>
+#endif
+
+#if defined(__linux__) || defined(__FreeBSD__)
 #include <unistd.h>
 #endif
 
Index: g++.dg/asan/interception-failure-test-1.C
===================================================================
--- g++.dg/asan/interception-failure-test-1.C	(revision 231047)
+++ g++.dg/asan/interception-failure-test-1.C	(working copy)
@@ -3,7 +3,7 @@
 
 // { dg-do run }
 // { dg-options "-fno-builtin-malloc -fno-builtin-free" }
-// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
+// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu *-*-freebsd* } } }
 
 #include <stdlib.h>
 #include <stdio.h>
Index: g++.dg/asan/interception-malloc-test-1.C
===================================================================
--- g++.dg/asan/interception-malloc-test-1.C	(revision 231047)
+++ g++.dg/asan/interception-malloc-test-1.C	(working copy)
@@ -1,8 +1,8 @@
 // ASan interceptor can be accessed with __interceptor_ prefix.
 
-// { dg-do run { target *-*-linux* } }
+// { dg-do run { target *-*-linux* *-*-freebsd* } }
 // { dg-options "-fno-builtin-free" }
-// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
+// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu *-*-freebsd* } } }
 // { dg-shouldfail "asan" }
 
 #include <stdlib.h>
Index: g++.dg/asan/interception-test-1.C
===================================================================
--- g++.dg/asan/interception-test-1.C	(revision 231047)
+++ g++.dg/asan/interception-test-1.C	(working copy)
@@ -2,7 +2,7 @@
 
 // { dg-do run }
 // { dg-options "-fno-builtin-malloc -fno-builtin-free" }
-// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
+// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu *-*-freebsd* } } }
 // { dg-shouldfail "asan" }
 // { dg-skip-if "Darwin uses mac function interposition" { *-*-darwin* } }
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch] c/c++ asan tests for FreeBSD
  2015-11-29 20:03 [patch] c/c++ asan tests for FreeBSD Andreas Tobler
  2015-11-29 22:10 ` Andreas Tobler
@ 2015-11-30 10:32 ` Bernd Schmidt
  2015-11-30 12:12   ` Andreas Tobler
  1 sibling, 1 reply; 7+ messages in thread
From: Bernd Schmidt @ 2015-11-30 10:32 UTC (permalink / raw)
  To: Andreas Tobler, GCC Patches

On 11/29/2015 08:32 PM, Andreas Tobler wrote:
> Hi all,
>
> the attached patch prepares the testsuite, c and c++, for the upcoming
> ASAN support for FreeBSD (x86_64 first).
>
> I tested the patch on CentOS7.1 x86_64 and on FreeBSD x86_64.
> Results can be seen on the list.
>
> Is this ok for trunk?
>
> -/* { dg-do run { target { *-*-linux* } } } */
> +/* { dg-do run { target { *-*-linux* *-*-freebsd* } } } */

I see a patch from you to add asan support to x86 freebsd, but what 
about other architectures?


Bernd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch] c/c++ asan tests for FreeBSD
  2015-11-30 10:32 ` Bernd Schmidt
@ 2015-11-30 12:12   ` Andreas Tobler
  2015-11-30 16:22     ` Bernd Schmidt
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Tobler @ 2015-11-30 12:12 UTC (permalink / raw)
  To: Bernd Schmidt, GCC Patches

On 30.11.15 11:28, Bernd Schmidt wrote:
> On 11/29/2015 08:32 PM, Andreas Tobler wrote:
>> Hi all,
>>
>> the attached patch prepares the testsuite, c and c++, for the upcoming
>> ASAN support for FreeBSD (x86_64 first).
>>
>> I tested the patch on CentOS7.1 x86_64 and on FreeBSD x86_64.
>> Results can be seen on the list.
>>
>> Is this ok for trunk?
>>
>> -/* { dg-do run { target { *-*-linux* } } } */
>> +/* { dg-do run { target { *-*-linux* *-*-freebsd* } } } */
>
> I see a patch from you to add asan support to x86 freebsd, but what
> about other architectures?

You mean because of the wildcard? I'll add them as I have time to port them.

For now they are UNSUPPORTED.

Does every *-*-linux* has asan support?

Andreas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch] c/c++ asan tests for FreeBSD
  2015-11-30 12:12   ` Andreas Tobler
@ 2015-11-30 16:22     ` Bernd Schmidt
  2015-11-30 16:33       ` Jakub Jelinek
  0 siblings, 1 reply; 7+ messages in thread
From: Bernd Schmidt @ 2015-11-30 16:22 UTC (permalink / raw)
  To: Andreas Tobler, GCC Patches

On 11/30/2015 01:12 PM, Andreas Tobler wrote:
> On 30.11.15 11:28, Bernd Schmidt wrote:
>> On 11/29/2015 08:32 PM, Andreas Tobler wrote:
>>> -/* { dg-do run { target { *-*-linux* } } } */
>>> +/* { dg-do run { target { *-*-linux* *-*-freebsd* } } } */
>>
>> I see a patch from you to add asan support to x86 freebsd, but what
>> about other architectures?
>
> You mean because of the wildcard? I'll add them as I have time to port
> them.
>
> For now they are UNSUPPORTED.

Is that how they show up, or do you get FAILs on other FreeBSDs?

> Does every *-*-linux* has asan support?

Probably not, but I guess the main ones people tend to test.


Bernd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch] c/c++ asan tests for FreeBSD
  2015-11-30 16:22     ` Bernd Schmidt
@ 2015-11-30 16:33       ` Jakub Jelinek
  2015-11-30 20:18         ` Andreas Tobler
  0 siblings, 1 reply; 7+ messages in thread
From: Jakub Jelinek @ 2015-11-30 16:33 UTC (permalink / raw)
  To: Bernd Schmidt; +Cc: Andreas Tobler, GCC Patches

On Mon, Nov 30, 2015 at 05:17:29PM +0100, Bernd Schmidt wrote:
> On 11/30/2015 01:12 PM, Andreas Tobler wrote:
> >On 30.11.15 11:28, Bernd Schmidt wrote:
> >>On 11/29/2015 08:32 PM, Andreas Tobler wrote:
> >>>-/* { dg-do run { target { *-*-linux* } } } */
> >>>+/* { dg-do run { target { *-*-linux* *-*-freebsd* } } } */
> >>
> >>I see a patch from you to add asan support to x86 freebsd, but what
> >>about other architectures?
> >
> >You mean because of the wildcard? I'll add them as I have time to port
> >them.
> >
> >For now they are UNSUPPORTED.
> 
> Is that how they show up, or do you get FAILs on other FreeBSDs?

This is inside of asan.exp, which is guarded with
check_effective_target_fsanitize_address
and therefore should not be run at all on non-asan targets.
I think the testsuite changes are fine, but it IMHO doesn't make sense to
commit it until the FreeBSD asan supports lands in (which is dependent on
the upstream libsanitizer change I believe).  Once it happens, it can be
cherry-picked from there, the config/i386 part looks reasonable.

	Jakub

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch] c/c++ asan tests for FreeBSD
  2015-11-30 16:33       ` Jakub Jelinek
@ 2015-11-30 20:18         ` Andreas Tobler
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Tobler @ 2015-11-30 20:18 UTC (permalink / raw)
  To: Jakub Jelinek, Bernd Schmidt; +Cc: GCC Patches

On 30.11.15 17:22, Jakub Jelinek wrote:
> On Mon, Nov 30, 2015 at 05:17:29PM +0100, Bernd Schmidt wrote:
>> On 11/30/2015 01:12 PM, Andreas Tobler wrote:
>>> On 30.11.15 11:28, Bernd Schmidt wrote:
>>>> On 11/29/2015 08:32 PM, Andreas Tobler wrote:
>>>>> -/* { dg-do run { target { *-*-linux* } } } */
>>>>> +/* { dg-do run { target { *-*-linux* *-*-freebsd* } } } */
>>>>
>>>> I see a patch from you to add asan support to x86 freebsd, but what
>>>> about other architectures?
>>>
>>> You mean because of the wildcard? I'll add them as I have time to port
>>> them.
>>>
>>> For now they are UNSUPPORTED.
>>
>> Is that how they show up, or do you get FAILs on other FreeBSDs?
>
> This is inside of asan.exp, which is guarded with
> check_effective_target_fsanitize_address
> and therefore should not be run at all on non-asan targets.

It manifests this way:

/usr/local/bin/ld: cannot find libasan_preinit.o: No such file or directory
/usr/local/bin/ld: cannot find -lasan
collect2: error: ld returned 1 exit status

Then it bails out and the asan tests are skipped.

...
testsuite/gcc.dg/asan/asan.exp completed in 1 seconds
...

There is no UNSUPPORTED in the log file.

> I think the testsuite changes are fine, but it IMHO doesn't make sense to
> commit it until the FreeBSD asan supports lands in (which is dependent on
> the upstream libsanitizer change I believe).  Once it happens, it can be
> cherry-picked from there, the config/i386 part looks reasonable.

I agree that it doesn't make much sense to commit for the public, but 
I'd have a patch less on the table ;)

But, np problem at all.

This is the cherry I'd like to pick once it has landed :)

http://reviews.llvm.org/D15049

The part for lib/asan/asan_linux.cc.

Thanks for the comments!
Andreas

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-30 19:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-29 20:03 [patch] c/c++ asan tests for FreeBSD Andreas Tobler
2015-11-29 22:10 ` Andreas Tobler
2015-11-30 10:32 ` Bernd Schmidt
2015-11-30 12:12   ` Andreas Tobler
2015-11-30 16:22     ` Bernd Schmidt
2015-11-30 16:33       ` Jakub Jelinek
2015-11-30 20:18         ` Andreas Tobler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).