[Bug sanitizer/108256] Missing integer overflow instrumentation when assignment LHS is narrow

2024-07-17 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108256

--- Comment #8 from Marek Polacek  ---
*** Bug 115971 has been marked as a duplicate of this bug. ***

[Bug sanitizer/108256] Missing integer overflow instrumentation when assignment LHS is narrow

2024-06-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108256

--- Comment #7 from Andrew Pinski  ---
*** Bug 115323 has been marked as a duplicate of this bug. ***

[Bug sanitizer/108256] Missing integer overflow instrumentation when assignment LHS is narrow

2024-05-19 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108256

Andrew Pinski  changed:

   What|Removed |Added

 CC||bic60176 at gmail dot com

--- Comment #6 from Andrew Pinski  ---
*** Bug 115155 has been marked as a duplicate of this bug. ***

[Bug sanitizer/108256] Missing integer overflow instrumentation when assignment LHS is narrow

2024-03-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108256

Andrew Pinski  changed:

   What|Removed |Added

 CC||haoxintu at gmail dot com

--- Comment #5 from Andrew Pinski  ---
*** Bug 95326 has been marked as a duplicate of this bug. ***

[Bug sanitizer/108256] Missing integer overflow instrumentation when assignment LHS is narrow

2024-02-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108256

Andrew Pinski  changed:

   What|Removed |Added

 CC||jiajing_zheng at 163 dot com

--- Comment #4 from Andrew Pinski  ---
*** Bug 113702 has been marked as a duplicate of this bug. ***

[Bug sanitizer/108256] Missing integer overflow instrumentation when assignment LHS is narrow

2024-02-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108256

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |13.0

[Bug sanitizer/108256] Missing integer overflow instrumentation when assignment LHS is narrow

2023-01-04 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108256

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #3 from Jakub Jelinek  ---
Fixed on the trunk.

[Bug sanitizer/108256] Missing integer overflow instrumentation when assignment LHS is narrow

2023-01-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108256

--- Comment #2 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:8692b15ae7c05e3224f285069e070c009d9f6efe

commit r13-4988-g8692b15ae7c05e3224f285069e070c009d9f6efe
Author: Jakub Jelinek 
Date:   Wed Jan 4 10:52:49 2023 +0100

ubsan: Avoid narrowing of multiply for -fsanitize=signed-integer-overflow
[PR108256]

We shouldn't narrow multiplications originally done in signed types,
because the original multiplication might overflow but the narrowed
one will be done in unsigned arithmetics and will never overflow.

2023-01-04  Jakub Jelinek  

PR sanitizer/108256
* convert.cc (do_narrow): Punt for MULT_EXPR if original
type doesn't wrap around and -fsanitize=signed-integer-overflow
is on.
* fold-const.cc (fold_unary_loc) : Likewise.

* c-c++-common/ubsan/pr108256.c: New test.

[Bug sanitizer/108256] Missing integer overflow instrumentation when assignment LHS is narrow

2023-01-03 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108256

Jakub Jelinek  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
   Last reconfirmed||2023-01-03
 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED

--- Comment #1 from Jakub Jelinek  ---
Created attachment 54177
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54177&action=edit
gcc13-pr108256.patch

Untested fix.