[Bug target/98491] [MIPS] ICE: in mode_size_inline, with -mmsa
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98491 Xi Ruoyao changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|--- |11.0 Status|UNCONFIRMED |RESOLVED --- Comment #4 from Xi Ruoyao --- All unfixed branches are closed.
[Bug target/98491] [MIPS] ICE: in mode_size_inline, with -mmsa
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98491 --- Comment #3 from CVS Commits --- The master branch has been updated by Richard Sandiford : https://gcc.gnu.org/g:06505e701dcfdb1b9855601d6cf0aa1caea62975 commit r11-7264-g06505e701dcfdb1b9855601d6cf0aa1caea62975 Author: Xi Ruoyao Date: Wed Feb 17 11:57:13 2021 + mips: Avoid out-of-bounds access in mips_symbol_insns [PR98491] An invalid use of MSA_SUPPORTED_MODE_P was causing an ICE on mips64el with -mmsa. The detailed analysis is posted on bugzilla. gcc/ChangeLog: 2021-02-17 Xi Ruoyao PR target/98491 * config/mips/mips.c (mips_symbol_insns): Do not use MSA_SUPPORTED_MODE_P if mode is MAX_MACHINE_MODE.
[Bug target/98491] [MIPS] ICE: in mode_size_inline, with -mmsa
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98491 --- Comment #2 from Xi Ruoyao --- Patch proposed: https://gcc.gnu.org/pipermail/gcc-patches/2020-December/562629.html
[Bug target/98491] [MIPS] ICE: in mode_size_inline, with -mmsa
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98491 --- Comment #1 from Xi Ruoyao --- It can be reproduced with a cross build on x86_64-linux, with asan: $ ../gcc/configure --target=mips64el-unknown-linux-gnuabi64 --with-abi=64 --enable-languages=c,c++ --with-system-zlib (build log skipped) $ ASAN_OPTIONS=detect_leaks=0:use_odr_indicator=1 make all-gcc {C,CXX,LD}FLAGS="-O0 -g3 -ggdb -fsanitize=address -static-libasan" -j 4 (build log skipped) $ gcc/cc1 ~/bug.c -nostdinc -mmsa f Analyzing compilation unit Performing interprocedural optimizations <*free_lang_data> {heap 0 } {heap 0 } {heap 0 } {heap 0 } {heap 0 } {heap 0 } {heap 0 }Streaming LTO {heap 0 } {heap 0 } {heap 0 } {heap 0 } {heap 0 } {heap 0 } {heap 0 }Assembling functions: f= ==257274==ERROR: AddressSanitizer: global-buffer-overflow on address 0x0521e70a at pc 0x02c535c1 bp 0x7ffc1ac50930 sp 0x7ffc1ac50928 READ of size 2 at 0x0521e70a thread T0 #0 0x2c535c0 in mode_to_bytes(machine_mode) ../../gcc/gcc/machmode.h:550 #1 0x2c535c0 in mips_symbol_insns ../../gcc/gcc/config/mips/mips.c:2384 #2 0x2c591fc in mips_const_insns(rtx_def*) ../../gcc/gcc/config/mips/mips.c:2895 (more asan output skipped)