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

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jun 24 11:01:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80348

--- Comment #12 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Sat Jun 24 10:59:00 2017
New Revision: 249624

URL: https://gcc.gnu.org/viewcvs?rev=249624&root=gcc&view=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


More information about the Gcc-bugs mailing list