[Bug c++/107034] New: SIGSEGV in code using c style array

menkaur at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Sep 25 20:47:11 GMT 2022


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

            Bug ID: 107034
           Summary: SIGSEGV in code using c style array
           Product: gcc
           Version: 12.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: menkaur at gmail dot com
  Target Milestone: ---

Created attachment 53625
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53625&action=edit
c++ code to reproduce the bug

Attached code will result in address boundary error or similar issues at the
first line in any method that contains it.

To get it to work, run `g++ -O0 main.cpp -o test && ./test`

I had a bug where I was passing arguments into method that contained similar
code, and, when examined in gdb, I was passing valid arguments and receiving
invalid arguments inside.

Bug only became apparent to me when using large enough array


More information about the Gcc-bugs mailing list