public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/67414] New: [5 Regression] Error message on failed allocate
@ 2015-08-31 16:32 Joost.VandeVondele at mat dot ethz.ch
  2015-08-31 21:03 ` [Bug fortran/67414] " jb at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2015-08-31 16:32 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67414
           Summary: [5 Regression] Error message on failed allocate
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Joost.VandeVondele at mat dot ethz.ch
  Target Milestone: ---

For 4.9 and earlier a gfortran compiled binary would print a clear error
message if an allocate would fail like in:

> cat test.f90 
INTEGER, POINTER, DIMENSION(:) :: leak
DO
  ALLOCATE(leak(1000))
  leak=0
ENDDO
END
> gfortran -g test.f90
> ulimit -v 1000000
> ./a.out
Operating system error: Cannot allocate memory
Allocation would exceed memory limit

With gcc 5 I get only part of the error, but also a backtrace (which is nice) :

> ./a.out
Operating system error: 
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7F610BCC0B87
#1  0x7F610BCBFD80
#2  0x3BA4A3269F
#3  0x3BA4A2B38F
#4  0x7F610BCC1A92
#5  0x7F610BCC1B80
#6  0x400786 in MAIN__ at test.f90:3 (discriminator 3)
Segmentation fault

With gcc 6, unfortunately, the backtrace is replace with an error message:
> ./a.out
Operating system error: 
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:

Something went wrong while printing the backtrace: mmap

Something went wrong while printing the backtrace: mmap

Something went wrong while printing the backtrace: mmap
Segmentation fault

Ideally, we get both the clear error message and a backtrace.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-02 15:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-31 16:32 [Bug fortran/67414] New: [5 Regression] Error message on failed allocate Joost.VandeVondele at mat dot ethz.ch
2015-08-31 21:03 ` [Bug fortran/67414] " jb at gcc dot gnu.org
2015-09-01  8:34 ` [Bug fortran/67414] [5/6 " rguenth at gcc dot gnu.org
2015-09-02 14:52 ` jb at gcc dot gnu.org
2015-09-02 15:16 ` jb at gcc dot gnu.org

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).