public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, CHKP, PR target/65044] Restrict pointer bounds checker with Sanitizer
@ 2015-02-16 15:21 Ilya Enkovich
  2015-02-16 15:33 ` Jakub Jelinek
  0 siblings, 1 reply; 10+ messages in thread
From: Ilya Enkovich @ 2015-02-16 15:21 UTC (permalink / raw)
  To: gcc-patches

Hi,

This patch restricts usage of Pointer Bounds Checker with Sanitizer.  OK for trunk?

Thanks,
Ilya
--
gcc/

2015-02-16  Ilya Enkovich  <ilya.enkovich@intel.com>

	PR target/65044
	* toplev.c (process_options): Restrict Pointer Bounds Checker
	usage with sanitizers.

gcc/testsuite/

2015-02-16  Ilya Enkovich  <ilya.enkovich@intel.com>

	PR target/65044
	* gcc.target/i386/pr65044.c: New.


diff --git a/gcc/testsuite/gcc.target/i386/pr65044.c b/gcc/testsuite/gcc.target/i386/pr65044.c
new file mode 100644
index 0000000..79ecb04
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr65044.c
@@ -0,0 +1,12 @@
+/* { dg-error "-fcheck-pointer-bounds is not supported with sanitizers" } */
+/* { dg-do compile } */
+/* { dg-require-effective-target mpx } */
+/* { dg-options "-fcheck-pointer-bounds -mmpx -fsanitize=address" } */
+
+extern int x[];
+
+void
+foo ()
+{
+  x[0] = 0;
+}
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 99cf180..bf987c8 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1376,6 +1376,9 @@ process_options (void)
     {
       if (targetm.chkp_bound_mode () == VOIDmode)
 	error ("-fcheck-pointer-bounds is not supported for this target");
+
+      if (flag_sanitize)
+	error ("-fcheck-pointer-bounds is not supported with sanitizers");
     }
 
   /* One region RA really helps to decrease the code size.  */

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

end of thread, other threads:[~2015-03-12 11:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-16 15:21 [PATCH, CHKP, PR target/65044] Restrict pointer bounds checker with Sanitizer Ilya Enkovich
2015-02-16 15:33 ` Jakub Jelinek
2015-02-16 15:57   ` Ilya Enkovich
2015-02-16 16:01     ` Jakub Jelinek
2015-02-16 17:15       ` Ilya Enkovich
2015-03-02 10:25         ` Ilya Enkovich
2015-03-09 14:51           ` Jakub Jelinek
2015-03-12 11:28             ` Ilya Enkovich
2015-03-12 11:56               ` Jakub Jelinek
2015-03-12 11:16                 ` Ilya Enkovich

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).