diff options
author | Kishan Parmar <kishan@linux.ibm.com> | 2025-08-23 00:28:09 +0530 |
---|---|---|
committer | Kishan Parmar <kishan@linux.ibm.com> | 2025-08-23 00:28:09 +0530 |
commit | 9d63110c4334335a920424c301691dae9ecf398f (patch) | |
tree | 6d355b5ce8b12f88b1a6cf402204edb3887d442f /libjava/gnu/xml/dom/ls/DomLSOutput.h | |
parent | ebbeaf490c56e04d2e9be25caf9522ef5fba6c72 (diff) | |
download | gcc-master.zip gcc-master.tar.gz gcc-master.tar.bz2 |
This patch adds missing guards on shift amounts to prevent UB when the
shift count equals or exceeds HOST_BITS_PER_WIDE_INT.
In the patch (r16-2666-g647bd0a02789f1), shift counts were only checked
for nonzero but not for being within valid bounds. This patch tightens
those conditions by enforcing that shift counts are greater than zero
and less than HOST_BITS_PER_WIDE_INT.
2025-08-23 Kishan Parmar <kishan@linux.ibm.com>
gcc/
PR target/118890
* config/rs6000/rs6000.cc (can_be_rotated_to_negative_lis): Add bounds
checks for shift counts to prevent undefined behavior.
(rs6000_emit_set_long_const): Likewise.
Diffstat (limited to 'libjava/gnu/xml/dom/ls/DomLSOutput.h')
0 files changed, 0 insertions, 0 deletions