From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AE0BD3857C73; Tue, 17 Nov 2020 21:22:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AE0BD3857C73 From: "jarod.keene at trojans dot dsu.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/97882] New: Segmentation Fault on improper redeclaration of function Date: Tue, 17 Nov 2020 21:22:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jarod.keene at trojans dot dsu.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Nov 2020 21:22:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97882 Bug ID: 97882 Summary: Segmentation Fault on improper redeclaration of function Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: jarod.keene at trojans dot dsu.edu Target Milestone: --- Created attachment 49579 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D49579&action=3Dedit Save Temps output from code compilation After fuzzing GCC version 10.2.0 for grammar-based errors we discovered a segmentation fault flaw within the compiler. This flaw is also none to be present in GCC versions 7.5.0, 8.3.0, and 9.3.0. Attached is the output from -save-temps. GCC Compilation and system options: Debian 5.8.0 Configured with: ../src/configure -v --with-pkgversion=3D'Debian 10.2.0-16' --with-bugurl=3Dfile:///usr/share/doc/gcc-10/README.Bugs --enable-languages=3Dc,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix= =3D/usr --with-gcc-major-version-only --program-suffix=3D-10 --program-prefix=3Dx86_64-linux-gnu- --enable-shared --enable-linker-build-= id --libexecdir=3D/usr/lib --without-included-gettext --enable-threads=3Dposix --libdir=3D/usr/lib --enable-nls --enable-clocale=3Dgnu --enable-libstdcxx-= debug --enable-libstdcxx-time=3Dyes --with-default-libstdcxx-abi=3Dnew --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=3Drelea= se --with-target-system-zlib=3Dauto --enable-objc-gc=3Dauto --enable-multiarch --disable-werror --with-arch-32=3Di686 --with-abi=3Dm64 --with-multilib-list=3Dm32,m64,mx32 --enable-multilib --with-tune=3Dgeneric --enable-offload-targets=3Dnvptx-none=3D/build/gcc-10-YRn5ue/gcc-10-10.2.0/= debian/tmp-nvptx/usr,amdgcn-amdhsa=3D/build/gcc-10-YRn5ue/gcc-10-10.2.0/deb= ian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=3Dyes,extra,rtl --build=3Dx86_64-li= nux-gnu --host=3Dx86_64-linux-gnu --target=3Dx86_64-linux-gnu Compilation Command Line: gcc bug.c Compilation Error Message: bug.c: In function =E2=80=98x=E2=80=99: bug.c:4:2: internal compiler error: Segmentation fault 4 | const unsigned x() {}; | ^~~~~ 0xfe8a6f crash_signal ../../src/gcc/toplev.c:328 0x7f65d0b7ce2f ??? ./signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0xb01de6 must_pass_in_stack_var_size_or_pad(function_arg_info const&) ../../src/gcc/calls.c:6216 0x130b3e8 ix86_must_pass_in_stack ../../src/gcc/config/i386/i386.c:1458 0x1337b4a classify_argument ../../src/gcc/config/i386/i386.c:2065 0x13383ca examine_argument ../../src/gcc/config/i386/i386.c:2459 0x1338d31 ix86_return_in_memory ../../src/gcc/config/i386/i386.c:3826 0xca98fe aggregate_value_p(tree_node const*, tree_node const*) ../../src/gcc/function.c:2111 0xcae74c allocate_struct_function(tree_node*, bool) ../../src/gcc/function.c:4814 0x9e9774 store_parm_decls() ../../src/gcc/c/c-decl.c:9781 0xa42092 c_parser_declaration_or_fndef ../../src/gcc/c/c-parser.c:2466 0xa21fff c_parser_compound_statement_nostart ../../src/gcc/c/c-parser.c:5718 0xa40764 c_parser_compound_statement ../../src/gcc/c/c-parser.c:5617 0xa42221 c_parser_declaration_or_fndef ../../src/gcc/c/c-parser.c:2505 0xa4a393 c_parser_external_declaration ../../src/gcc/c/c-parser.c:1745 0xa4ae91 c_parser_translation_unit ../../src/gcc/c/c-parser.c:1618 0xa4ae91 c_parse_file() ../../src/gcc/c/c-parser.c:21752 0xaa219b c_common_parse_file() ../../src/gcc/c-family/c-opts.c:1190=