[Bug sanitizer/80348] [6 Regression] UBSAN: compile time crash in ubsan_instrument_division

2017-06-24 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80348

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #13 from Marek Polacek  ---
Fixed.

[Bug sanitizer/80348] [6 Regression] UBSAN: compile time crash in ubsan_instrument_division

2017-06-24 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80348

--- Comment #12 from Marek Polacek  ---
Author: mpolacek
Date: Sat Jun 24 10:59:00 2017
New Revision: 249624

URL: https://gcc.gnu.org/viewcvs?rev=249624=gcc=rev
Log:
PR sanitizer/80348
* typeck.c (cp_build_binary_op): Use NULL_TREE instead of NULL.  Set
ORIG_TYPE earlier and not only when shortening.

* g++.dg/ubsan/div-by-zero-3.C: New test.

Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/ubsan/div-by-zero-3.C
Modified:
branches/gcc-6-branch/gcc/cp/ChangeLog
branches/gcc-6-branch/gcc/cp/typeck.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug sanitizer/80348] [6 Regression] UBSAN: compile time crash in ubsan_instrument_division

2017-06-24 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80348

--- Comment #11 from Marek Polacek  ---
Author: mpolacek
Date: Sat Jun 24 10:57:01 2017
New Revision: 249623

URL: https://gcc.gnu.org/viewcvs?rev=249623=gcc=rev
Log:
PR sanitizer/80348
* typeck.c (cp_build_binary_op): Convert COP[01] to ORIG_TYPE.

* g++.dg/ubsan/div-by-zero-2.C: New test.

Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/ubsan/div-by-zero-2.C
Modified:
branches/gcc-6-branch/gcc/cp/ChangeLog
branches/gcc-6-branch/gcc/cp/typeck.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug sanitizer/80348] [6 Regression] UBSAN: compile time crash in ubsan_instrument_division

2017-04-10 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80348

Marek Polacek  changed:

   What|Removed |Added

Summary|[6/7 Regression] UBSAN: |[6 Regression] UBSAN:
   |compile time crash in   |compile time crash in
   |ubsan_instrument_division   |ubsan_instrument_division

--- Comment #10 from Marek Polacek  ---
Fixed on trunk so far.

[Bug sanitizer/80348] [6 Regression] UBSAN: compile time crash in ubsan_instrument_division

2017-04-07 Thread babokin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80348

--- Comment #7 from Dmitry Babokin  ---
These tests are still failing:
> cat f1.cpp
void foo() { 0 / unsigned(!(0 - 3) >= (0 > 0)); }
> cat f2.cpp
extern long long int var_58;
void foo() { (0 >= 10253361740180 >= long(0 >= 0)) % var_58; }
> cat f3.cpp
void foo() { (0 < 0 >= (0 < 0 < 0)) % (unsigned(2) << 0); }

gcc revision 246776

[Bug sanitizer/80348] [6 Regression] UBSAN: compile time crash in ubsan_instrument_division

2017-04-07 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80348

Marek Polacek  changed:

   What|Removed |Added

Summary|[6/7 Regression] UBSAN: |[6 Regression] UBSAN:
   |compile time crash in   |compile time crash in
   |ubsan_instrument_division   |ubsan_instrument_division

--- Comment #6 from Marek Polacek  ---
Fixed on trunk so far.