diff options
| author | Andrew Pinski <andrew.pinski@oss.qualcomm.com> | 2026-01-25 15:08:31 -0800 |
|---|---|---|
| committer | Andrew Pinski <andrew.pinski@oss.qualcomm.com> | 2026-01-26 11:10:57 -0800 |
| commit | 3ec1d59c1705a21398076893d19e25ac18ff24a5 (patch) | |
| tree | 4f081a31bd133ea62095fa26dea6e50d0c301719 /libjava/gnu/java | |
| parent | e373a57b07de9290e8e3f6913f4179404f0b886e (diff) | |
| download | gcc-3ec1d59c1705a21398076893d19e25ac18ff24a5.zip gcc-3ec1d59c1705a21398076893d19e25ac18ff24a5.tar.gz gcc-3ec1d59c1705a21398076893d19e25ac18ff24a5.tar.bz2 | |
final: Fix out of bounds access for invalid asm operands [PR123709]
output_asm_insn has an out of bounds array access if the supplied
operand number in the inline-asm is "big" (>=MAX_RECOG_OPERANDS).
This makes it so that there is no longer an out of bounds access
by increasing the two arrays by one and using the last element as
the fake location for all out of range operands.
This could be a regression because r0-38026-g4f9b4029463bc0 seems like
introduce the out of bounds access but
Bootstrapped and tested on x86_64-linux-gnu.
PR middle-end/123709
gcc/ChangeLog:
* final.cc (output_asm_operand_names): Skip over
opnum which is MAX_RECOG_OPERANDS (invalid).
(output_asm_insn): Increase opoutput and oporder size
by 1. For out of range operands, set the opnum to
MAX_RECOG_OPERANDS.
gcc/testsuite/ChangeLog:
* c-c++-common/asm-invalid-operand-1.c: New test.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Diffstat (limited to 'libjava/gnu/java')
0 files changed, 0 insertions, 0 deletions
