public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/13238] New: [gfortran] read(X,*) segfault on unformatted input unit
@ 2003-11-30  4:37 melvin dot hadasht at free dot fr
  2003-11-30  4:41 ` [Bug fortran/13238] " melvin dot hadasht at free dot fr
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: melvin dot hadasht at free dot fr @ 2003-11-30  4:37 UTC (permalink / raw)
  To: gcc-bugs

read(X, *) on a unit opened with form='unformatted' will trigger a segfault.
Expected behaviour is an error message at compile or at runtime. 

A write(X, *) succeeds. Expected behaviour is also an error message at compile
or at runtime.

Attached is a test case for the segfault at reading.

-- 
           Summary: [gfortran] read(X,*) segfault on unformatted input unit
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: melvin dot hadasht at free dot fr
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


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

* [Bug fortran/13238] [gfortran] read(X,*) segfault on unformatted input unit
  2003-11-30  4:37 [Bug fortran/13238] New: [gfortran] read(X,*) segfault on unformatted input unit melvin dot hadasht at free dot fr
@ 2003-11-30  4:41 ` melvin dot hadasht at free dot fr
  2003-11-30  4:46 ` melvin dot hadasht at free dot fr
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: melvin dot hadasht at free dot fr @ 2003-11-30  4:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From melvin dot hadasht at free dot fr  2003-11-30 04:41 -------
Created an attachment (id=5239)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5239&action=view)
test case showing segfault while reading unformatted unit using a read with a
format specifier

test case showing segfault while reading from unformatted unit using a read
with a format specifier

-- 


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


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

* [Bug fortran/13238] [gfortran] read(X,*) segfault on unformatted input unit
  2003-11-30  4:37 [Bug fortran/13238] New: [gfortran] read(X,*) segfault on unformatted input unit melvin dot hadasht at free dot fr
  2003-11-30  4:41 ` [Bug fortran/13238] " melvin dot hadasht at free dot fr
@ 2003-11-30  4:46 ` melvin dot hadasht at free dot fr
  2003-11-30  8:12 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: melvin dot hadasht at free dot fr @ 2003-11-30  4:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From melvin dot hadasht at free dot fr  2003-11-30 04:46 -------
Created an attachment (id=5240)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5240&action=view)
patch to fix the incomplete read/write operation type checking

It looks like libgfortran/io/transfer.c has an incomplete checking in
data_transfer_init(). The patch should fix it, but please bear in mind that I'm
not familiar with gcc code.

-- 


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


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

* [Bug fortran/13238] [gfortran] read(X,*) segfault on unformatted input unit
  2003-11-30  4:37 [Bug fortran/13238] New: [gfortran] read(X,*) segfault on unformatted input unit melvin dot hadasht at free dot fr
  2003-11-30  4:41 ` [Bug fortran/13238] " melvin dot hadasht at free dot fr
  2003-11-30  4:46 ` melvin dot hadasht at free dot fr
@ 2003-11-30  8:12 ` pinskia at gcc dot gnu dot org
  2003-11-30 13:37 ` melvin dot hadasht at free dot fr
  2003-12-05 13:17 ` steven at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-30  8:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-11-30 08:11 -------
Patches for gfortran go to fortran@gcc.gnu.org and gcc-patches, thanks.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-11-30 08:12:00
               date|                            |
   Target Milestone|---                         |tree-ssa


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


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

* [Bug fortran/13238] [gfortran] read(X,*) segfault on unformatted input unit
  2003-11-30  4:37 [Bug fortran/13238] New: [gfortran] read(X,*) segfault on unformatted input unit melvin dot hadasht at free dot fr
                   ` (2 preceding siblings ...)
  2003-11-30  8:12 ` pinskia at gcc dot gnu dot org
@ 2003-11-30 13:37 ` melvin dot hadasht at free dot fr
  2003-12-05 13:17 ` steven at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: melvin dot hadasht at free dot fr @ 2003-11-30 13:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From melvin dot hadasht at free dot fr  2003-11-30 13:37 -------
Ok, I sent copies to fortran@gcc.gnu.org and gcc-patches@gcc.gnu.org. Thanks.

-- 


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


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

* [Bug fortran/13238] [gfortran] read(X,*) segfault on unformatted input unit
  2003-11-30  4:37 [Bug fortran/13238] New: [gfortran] read(X,*) segfault on unformatted input unit melvin dot hadasht at free dot fr
                   ` (3 preceding siblings ...)
  2003-11-30 13:37 ` melvin dot hadasht at free dot fr
@ 2003-12-05 13:17 ` steven at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-12-05 13:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2003-12-05 13:17 -------
Fixed with Melvin's patch. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2003-12-05 13:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-30  4:37 [Bug fortran/13238] New: [gfortran] read(X,*) segfault on unformatted input unit melvin dot hadasht at free dot fr
2003-11-30  4:41 ` [Bug fortran/13238] " melvin dot hadasht at free dot fr
2003-11-30  4:46 ` melvin dot hadasht at free dot fr
2003-11-30  8:12 ` pinskia at gcc dot gnu dot org
2003-11-30 13:37 ` melvin dot hadasht at free dot fr
2003-12-05 13:17 ` steven at gcc dot gnu dot 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).