[Bug target/65705] ICE: SIGSEGV in contains_struct_check with -fsanitize=null -fcheck-pointer-bounds

2016-12-27 Thread aivchenk at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65705

Alexander Ivchenko  changed:

   What|Removed |Added

 CC||aivchenk at gmail dot com

--- Comment #3 from Alexander Ivchenko  ---
The same problem as: whttps://gcc.gnu.org/bugzilla/show_bug.cgi?id=69804

[Bug target/65705] ICE: SIGSEGV in contains_struct_check with -fsanitize=null -fcheck-pointer-bounds

2016-04-22 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65705

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-04-22
 CC||msebor at gcc dot gnu.org
 Ever confirmed|0   |1
  Known to fail||6.0

--- Comment #2 from Martin Sebor  ---
Confirmed with 6.0:

$ cat v.c && gcc -S -fsanitize=null -fcheck-pointer-bounds -mmpx -xc v.c
int
foo (int *p)
{
  return *p;
}
v.c:5:1: internal compiler error: Segmentation fault
 }
 ^
0xe3bfe8 crash_signal
/home/msebor/scm/fsf/gcc-69517/gcc/toplev.c:335
0x752dea contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
/home/msebor/scm/fsf/gcc-69517/gcc/tree.h:3119
0xf296f9 chkp_walk_pointer_assignments
/home/msebor/scm/fsf/gcc-69517/gcc/tree-chkp.c:3725
0xf29f9d chkp_finish_file()
/home/msebor/scm/fsf/gcc-69517/gcc/tree-chkp.c:3835
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug target/65705] ICE: SIGSEGV in contains_struct_check with -fsanitize=null -fcheck-pointer-bounds

2017-03-02 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65705

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org

--- Comment #4 from Martin Liška  ---
I'll prepare patch for this PR.

[Bug target/65705] ICE: SIGSEGV in contains_struct_check with -fsanitize=null -fcheck-pointer-bounds

2017-03-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65705

--- Comment #5 from Martin Liška  ---
Author: marxin
Date: Thu Mar  9 10:04:50 2017
New Revision: 245997

URL: https://gcc.gnu.org/viewcvs?rev=245997&root=gcc&view=rev
Log:
Disable -fcheck-pointer-bounds with sanitizers.

2017-03-09  Martin Liska  

PR target/65705
PR target/69804
* toplev.c (process_options): Disable -fcheck-pointer-bounds with
sanitizers.
2017-03-09  Martin Liska  

PR target/65705
PR target/69804
* gcc.target/i386/pr71458.c: Update scanned pattern.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/pr71458.c
trunk/gcc/toplev.c

[Bug target/65705] ICE: SIGSEGV in contains_struct_check with -fsanitize=null -fcheck-pointer-bounds

2017-03-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65705

Martin Liška  changed:

   What|Removed |Added

  Known to work||7.0
  Known to fail|7.0 |

--- Comment #6 from Martin Liška  ---
Fixed on trunk so far.

[Bug target/65705] ICE: SIGSEGV in contains_struct_check with -fsanitize=null -fcheck-pointer-bounds

2017-03-10 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65705

--- Comment #7 from Martin Liška  ---
Author: marxin
Date: Fri Mar 10 13:24:45 2017
New Revision: 246027

URL: https://gcc.gnu.org/viewcvs?rev=246027&root=gcc&view=rev
Log:
MPX: Fix option handling.

2017-03-10  Martin Liska  

PR target/65705
PR target/69804
* toplev.c (process_options): Enable MPX with LSAN and UBSAN.
* tree-chkp.c (chkp_walk_pointer_assignments): Verify that
FIELD != NULL.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/pr71458.c
trunk/gcc/toplev.c
trunk/gcc/tree-chkp.c

[Bug target/65705] ICE: SIGSEGV in contains_struct_check with -fsanitize=null -fcheck-pointer-bounds

2017-03-22 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65705

--- Comment #8 from Martin Liška  ---
Author: marxin
Date: Wed Mar 22 10:43:59 2017
New Revision: 246354

URL: https://gcc.gnu.org/viewcvs?rev=246354&root=gcc&view=rev
Log:
Backport r245997

2017-03-22  Martin Liska  

Backport from mainline
2017-03-09  Martin Liska  

PR target/65705
PR target/69804
* toplev.c (process_options): Disable -fcheck-pointer-bounds with
sanitizers.
2017-03-22  Martin Liska  

Backport from mainline
2017-03-09  Martin Liska  

PR target/65705
PR target/69804
* gcc.target/i386/pr71458.c: Update scanned pattern.

Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/testsuite/gcc.target/i386/pr71458.c
branches/gcc-6-branch/gcc/toplev.c

[Bug target/65705] ICE: SIGSEGV in contains_struct_check with -fsanitize=null -fcheck-pointer-bounds

2017-03-22 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65705

--- Comment #9 from Martin Liška  ---
Author: marxin
Date: Wed Mar 22 10:45:42 2017
New Revision: 246356

URL: https://gcc.gnu.org/viewcvs?rev=246356&root=gcc&view=rev
Log:
Backport r246027

2017-03-22  Martin Liska  

Backport from mainline
2017-03-10  Martin Liska  

PR target/65705
PR target/69804
* toplev.c (process_options): Enable MPX with LSAN and UBSAN.
* tree-chkp.c (chkp_walk_pointer_assignments): Verify that
FIELD != NULL.

Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/testsuite/gcc.target/i386/pr71458.c
branches/gcc-6-branch/gcc/toplev.c
branches/gcc-6-branch/gcc/tree-chkp.c

[Bug target/65705] ICE: SIGSEGV in contains_struct_check with -fsanitize=null -fcheck-pointer-bounds

2017-03-22 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65705

--- Comment #10 from Martin Liška  ---
Author: marxin
Date: Wed Mar 22 12:30:42 2017
New Revision: 246373

URL: https://gcc.gnu.org/viewcvs?rev=246373&root=gcc&view=rev
Log:
Backport r237353,r245997,r246027

2017-03-22  Martin Liska  

Backport from mainline
2016-06-13  Martin Liska  

PR target/65705
PR target/69804
PR sanitizer/71458

* toplev.c (process_options): Enable MPX with LSAN and UBSAN.
* tree-chkp.c (chkp_walk_pointer_assignments): Verify that
FIELD != NULL.
2017-03-22  Martin Liska  

Backport from mainline
2016-06-13  Martin Liska  

PR sanitizer/71458
* gcc.target/i386/pr71458.c: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/pr71458.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/toplev.c
branches/gcc-5-branch/gcc/tree-chkp.c

[Bug target/65705] ICE: SIGSEGV in contains_struct_check with -fsanitize=null -fcheck-pointer-bounds

2017-03-22 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65705

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Martin Liška  ---
Fixed on all active branches.

[Bug target/65705] ICE: SIGSEGV in contains_struct_check with -fsanitize=null -fcheck-pointer-bounds

2015-04-08 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65705

--- Comment #1 from Zdenek Sojka  ---
Another testcase fails with -fsanitize=signed-integer-overflow :

$ cat flags-min 
-fsanitize=signed-integer-overflow
-fcheck-pointer-bounds
-mmpx

$ /mnt/svn/gcc-trunk/binary-latest/bin/gcc @flags-min testcase-min0.i
testcase-min0.i:5:1: internal compiler error: Segmentation fault
 extern __inline int __sigismember (const __sigset_t *__set, int __sig) {
unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 *
sizeof (unsigned long int; unsigned long int __word = (((__sig) - 1) / (8 *
sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; }
 ^
0xc4fc3f crash_signal
/mnt/svn/gcc-trunk/gcc/toplev.c:383
0xcfa9d1 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
/mnt/svn/gcc-trunk/gcc/tree.h:2959
0xcfa9d1 chkp_walk_pointer_assignments
/mnt/svn/gcc-trunk/gcc/tree-chkp.c:3594
0xcfc8d7 chkp_finish_file()
/mnt/svn/gcc-trunk/gcc/tree-chkp.c:3704
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


The set of -fsanitize= flags incompatible with -fcheck-pointer-bounds might be
much larger.