Bug 231134 - gfortan-generated code cannot handle r/o partitions.
gfortan-generated code cannot handle r/o partitions.
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2007-03-06 08:56 EST by Pawel Salek
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 4.1.2-4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-03-13 10:53:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Pawel Salek 2007-03-06 08:56:38 EST
Description of problem:

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Compile following program with gfortran:
       program a
     & status='old')
       print *, "opening succeeded"
       goto 20
10     print *, "opening failed"
20     continue
2. touch aaa; sudo -s mount -oremount,ro /home
3. Run the compiled program
Actual results:
The program will fail to open the file.

Expected results:
The program should open the file in the read-only mode.

Additional info:
This feature worked with with g77. Following straces may be interesting:
g77-compiled code:
access("aaa", F_OK) = 0
open("aaa", O_RDWR|O_LARGEFILE) = -1 EROFS (Read-only file system)
open("aaa", O_RDONLY|O_LARGEFILE) = 3

gfortran-compiled code on r/o file on r/w partition:
open("afile", O_RDWR|O_LARGEFILE)       = -1 EACCES (Permission denied)
open("afile", O_RDONLY|O_LARGEFILE)     = 3

gfotran-compiled code on r/o partition:
open("aaa", O_RDWR|O_LARGEFILE) = -1 EROFS (Read-only file system)
write(1, " opening failed", 15 opening failed)         = 15
Comment 1 Jakub Jelinek 2007-03-13 10:53:42 EDT
Should be fixed in libgfortran-4.1.2-4 in rawhide.

Note You need to log in before you can comment on or make changes to this bug.