public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "townsend at astro dot wisc.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/112828] Abort with malloc(): corrupted top size
Date: Sun, 03 Dec 2023 16:28:41 +0000	[thread overview]
Message-ID: <bug-112828-4-SDWbPd1Pue@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112828-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Rich Townsend <townsend at astro dot wisc.edu> ---
I can get the MWE to barf on MacOS/Arm (Sonoma 14.1.1), gfortran 13.1.0, by
changing the length of the character vars in the main program from 64 to 16.
The error is now:

In file 'test.f90', around line 49: Error allocating 211106259502048 bytes:
Cannot allocate memory

Error termination. Backtrace:
#0  0x102d77617
#1  0x102d781b7
#2  0x102d78457
#3  0x10275f5bb
#4  0x10275fc37
#5  0x10275f84f
#6  0x10275fc87

Once again, commenting out the allocate w/ STAT line makes the problem go away.
It seems as though having two allocate invocations (one with stat, one without)
is causing some kind of memory corruption.

  parent reply	other threads:[~2023-12-03 16:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-02 23:12 [Bug fortran/112828] New: " townsend at astro dot wisc.edu
2023-12-03 13:38 ` [Bug fortran/112828] " fxcoudert at gcc dot gnu.org
2023-12-03 15:01 ` townsend at astro dot wisc.edu
2023-12-03 16:28 ` townsend at astro dot wisc.edu [this message]
2023-12-03 16:54 ` townsend at astro dot wisc.edu
2023-12-03 18:33 ` townsend at astro dot wisc.edu
2023-12-03 20:45 ` anlauf 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-112828-4-SDWbPd1Pue@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).