From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 989D23898399; Mon, 12 Sep 2022 17:35:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 989D23898399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663004102; bh=o/Q+j7bjg9DLEnaHCi5SgWO2tgukf7H7jmYrMyRJHJY=; h=From:To:Subject:Date:From; b=bm0hoe5R4UlGqwkG7LDbmcPTm1aZlQ82Ljh2JwTIfIMaZKACCuWkwC8iqBtEtUVGr yblCEr5eXkc+6zbVje4za1Jio3wdNKdoq81nKgp+5mRJfxW5hpsAqXT3cw4VtwCZsF 6VIziHQw/gQcgEJjtdyOR/gRV/T4H2CbKK9sW0zA= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/106915] New: ICE/segfault during parsing with modules and invalid code in malloc Date: Mon, 12 Sep 2022 17:35:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org 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 keywords 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106915 Bug ID: 106915 Summary: ICE/segfault during parsing with modules and invalid code in malloc Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Target Milestone: --- Created attachment 53564 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53564&action=3Dedit Testcase the following code ICEs either in variant (A) with: corrupted size vs. prev_size ... 0x7f18078ba08f ??? =20=20=20=20=20=20=20 /build/glibc-SzIz7B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sig= action.c:0 0x7f180790ca63 malloc_consolidate /build/glibc-SzIz7B/glibc-2.31/malloc/malloc.c:4492 0x7f180790ec82 _int_malloc Or in Variant (B) with: Error: Expecting END MODULE statement at (1) malloc(): mismatching next->prev_size (unsorted) malloc(): mismatching next->prev_size (unsorted) gfortran: internal compiler error: Aborted signal terminated program f951 The second variant seems to work also without -fopenmp, even though it has 'USE omp_lib'.=