public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "acoplan at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/100236] New: arm: UB in arm_compute_save_core_reg_mask (shift exponent 4294967295 is too large for 32-bit type 'int')
Date: Fri, 23 Apr 2021 17:12:52 +0000	[thread overview]
Message-ID: <bug-100236-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 100236
           Summary: arm: UB in arm_compute_save_core_reg_mask (shift
                    exponent 4294967295 is too large for 32-bit type
                    'int')
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

$ cat test.c
void a() {
  void b() {}
  b();
}
$ ./arm-eabi-gcc -c -fpic test.c
/data_sdb/toolchain/src/gcc/gcc/config/arm/arm.c:21008:27: runtime error: shift
exponent 4294967295 is too large for 32-bit type 'int'
    #0 0x2a07eee in arm_compute_save_core_reg_mask
/data_sdb/toolchain/src/gcc/gcc/config/arm/arm.c:21008
    #1 0x2a07eee in arm_compute_frame_layout
/data_sdb/toolchain/src/gcc/gcc/config/arm/arm.c:22629
    #2 0x1a9b56e in set_initial_elim_offsets
/data_sdb/toolchain/src/gcc/gcc/reload1.c:3766
    #3 0x1abe973 in calculate_elim_costs_all_insns()
/data_sdb/toolchain/src/gcc/gcc/reload1.c:1559
    #4 0x158e870 in ira_costs()
/data_sdb/toolchain/src/gcc/gcc/ira-costs.c:2296
    #5 0x157369e in ira_build()
/data_sdb/toolchain/src/gcc/gcc/ira-build.c:3426
    #6 0x155714d in ira /data_sdb/toolchain/src/gcc/gcc/ira.c:5655
    #7 0x155714d in execute /data_sdb/toolchain/src/gcc/gcc/ira.c:5978
    #8 0x192438e in execute_one_pass(opt_pass*)
/data_sdb/toolchain/src/gcc/gcc/passes.c:2567
    #9 0x1926e3a in execute_pass_list_1
/data_sdb/toolchain/src/gcc/gcc/passes.c:2656
    #10 0x1926df8 in execute_pass_list_1
/data_sdb/toolchain/src/gcc/gcc/passes.c:2657
    #11 0x1926e95 in execute_pass_list(function*, opt_pass*)
/data_sdb/toolchain/src/gcc/gcc/passes.c:2667
    #12 0xc22f30 in cgraph_node::expand()
/data_sdb/toolchain/src/gcc/gcc/cgraphunit.c:1830
    #13 0xc23e50 in cgraph_order_sort::process()
/data_sdb/toolchain/src/gcc/gcc/cgraphunit.c:2069
    #14 0xc2979a in output_in_order
/data_sdb/toolchain/src/gcc/gcc/cgraphunit.c:2137
    #15 0xc2979a in symbol_table::compile()
/data_sdb/toolchain/src/gcc/gcc/cgraphunit.c:2355
    #16 0xc3433a in symbol_table::finalize_compilation_unit()
/data_sdb/toolchain/src/gcc/gcc/cgraphunit.c:2539
    #17 0x1cc8e7f in compile_file /data_sdb/toolchain/src/gcc/gcc/toplev.c:482
    #18 0x1ccf7bf in do_compile /data_sdb/toolchain/src/gcc/gcc/toplev.c:2201
    #19 0x1ccf7bf in toplev::main(int, char**)
/data_sdb/toolchain/src/gcc/gcc/toplev.c:2340
    #20 0x432625c in main /data_sdb/toolchain/src/gcc/gcc/main.c:39
    #21 0x7ffff6740bf6 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
    #22 0x645e69 in _start
(/data_sdb/toolchain/build-arm-eabi-armv8.1-m.main+mve/install/libexec/gcc/arm-eabi/11.0.1/cc1+0x645e69)

             reply	other threads:[~2021-04-23 17:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 17:12 acoplan at gcc dot gnu.org [this message]
2021-04-23 17:22 ` [Bug target/100236] " acoplan at gcc dot gnu.org
2021-04-26 14:30 ` rearnsha at gcc dot gnu.org
2021-04-27 11:29 ` cvs-commit at gcc dot gnu.org
2021-04-27 11:42 ` rearnsha at gcc dot gnu.org
2021-04-28 11:09 ` cvs-commit at gcc dot gnu.org
2021-05-04 12:32 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-100236-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).