public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/50937] STAT option with ALLOCATE statement on large arrays
Date: Mon, 31 Oct 2011 19:51:00 -0000	[thread overview]
Message-ID: <bug-50937-4-nWbFuzMiAd@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-50937-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50937

--- Comment #7 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2011-10-31 19:50:41 UTC ---
On Mon, Oct 31, 2011 at 07:25:38PM +0000, fwi at inducks dot org wrote:
> 
> Has the bug been corrected in recent versions of gfortran, or do you really
> mean it's OK that gfortran claims an array has been allocated when it really
> has not been?
> 

Yes, the problem of integer overflow that Janne mentioned has
been corrected.

As to gfortran claiming "that an array has been allocated when
it really has not been", suggests that you may not understand
how your operating system works.  The concise story is that
gfortran asks your OS for a gazillion bytes of memory and
please confirm the status.  The OS tells gfortran (actually
your compiled code), here's your gazillion bytes of virtual
memory and everything is a-okay.  As long as you do not 
actually touch the pages of allocated virtual memory, no
physical memory has been allocated to your program.  Once
you start touching pages, at some point the OS notices a
shortage of physical memory.  This shortage leads to swapping
other (idle) processes out to secondary storage, utilizing
swap space as the backing storage for your virtual memory,
evidently your process exceeds its limits or the system
limits and the process segfaults.


  parent reply	other threads:[~2011-10-31 19:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-31 17:21 [Bug fortran/50937] New: " fwi at inducks dot org
2011-10-31 18:06 ` [Bug fortran/50937] " kargl at gcc dot gnu.org
2011-10-31 18:16 ` fwi at inducks dot org
2011-10-31 18:25 ` jb at gcc dot gnu.org
2011-10-31 18:29 ` fwi at inducks dot org
2011-10-31 19:02 ` jb at gcc dot gnu.org
2011-10-31 19:26 ` fwi at inducks dot org
2011-10-31 19:51 ` sgk at troutmask dot apl.washington.edu [this message]
2011-10-31 20:18 ` fwi at inducks dot org
2011-10-31 21:03 ` sgk at troutmask dot apl.washington.edu
2011-11-01  7:55 ` jb at gcc dot gnu.org
2011-11-01 12:01 ` fwi at inducks dot 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-50937-4-nWbFuzMiAd@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).