public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fxcoudert at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/102106] Freeing unallocated memory, with associate to derived type with polymorphic component
Date: Thu, 16 Dec 2021 18:03:40 +0000	[thread overview]
Message-ID: <bug-102106-4-My5YW80MOk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102106-4@http.gcc.gnu.org/bugzilla/>

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

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu.org
            Summary|Intermittent Segfault with  |Freeing unallocated memory,
                   |associate to derived type   |with associate to derived
                   |with polymorphic component  |type with polymorphic
                   |                            |component
          Component|libfortran                  |fortran
   Last reconfirmed|                            |2021-12-16
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Confirmed on aarch64-apple-darwin21, where it occurs systematically at -O0 (but
not higher optimisation).

It is not a library bug, but a front-end issue. The backtrace is the following:

* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00000001c47719b8 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x00000001c47a4eb0 libsystem_pthread.dylib`pthread_kill + 288
    frame #2: 0x00000001c46e2314 libsystem_c.dylib`abort + 164
    frame #3: 0x00000001c45c7a1c libsystem_malloc.dylib`malloc_vreport + 552
    frame #4: 0x00000001c45cb060 libsystem_malloc.dylib`malloc_report + 64
    frame #5: 0x00000001c45b9fa8 libsystem_malloc.dylib`free + 500
    frame #6: 0x0000000100003ea4 a.out`MAIN__ at a.f90:9:65
    frame #7: 0x0000000100003ef4 a.out`main at a.f90:11:11
    frame #8: 0x00000001000150f4 dyld`start + 520

There is only one call to free() generated,

  reply	other threads:[~2021-12-16 18:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27 20:52 [Bug libfortran/102106] New: Intermittent Segfault " everythingfunctional at protonmail dot com
2021-12-16 18:03 ` fxcoudert at gcc dot gnu.org [this message]
2021-12-16 18:05 ` [Bug fortran/102106] Freeing unallocated memory, " fxcoudert at gcc dot gnu.org
2023-04-08  8:04 ` cvs-commit at gcc dot gnu.org
2023-04-08  9:35 ` pault 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-102106-4-My5YW80MOk@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).