bug-gnucobol
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] BUG: OPEN EXTEND OPTIONAL FILE --> STATUS "05" if n


From: Thomas Biehler
Subject: [open-cobol-list] BUG: OPEN EXTEND OPTIONAL FILE --> STATUS "05" if no FILE found and CREATED ! SIGSEGV !
Date: Sun Aug 15 11:58:02 2004
User-agent: KMail/1.4.3

Hi Keisuke,

i have found a bug which caused  SIGSEGV  (signal 11)  if:

- OPEN EXTEND on OPTIONAL FILE 
       cannot find and create the assigned external file
  -->  it  delivers FILE STATUS  "05"   but the file-pointer 
         to the nonexisting  (and not created) file  is a  NULLPOINTER !

  If you access then this file (WRITE , READ)  the NULLPOINTER 
  access causes SIGSEGV !

 The attached demo-program  "TESTOPEN.cob"  causes this situation 
  because ASSIGN "MF"   (-std=mf)  is used and
  the "mapping-variable" contains not only a simple filename
  but a  filename with a part of a path!  
   
( by the way , micro-focus also replaces the first (PATH) -  component with 
  a existing environment  "$dd_  ... ,  $ DD_ ... ,  $DD_variablename"  as 
implemented
  at  the moment only for "simple" filename !   (libcob , open ...)
  (= a really usefull extension, as you can do mapping with directories 
(LOGFILE-PATH)  
      and a simple filename , instead fillup the ENVIRONMENT with
      ENVIRONMENT-variables for every LOGFILE   
    (= no need for EXTENAL MAPPING for every file !))

bye

Thomas

Attachment: TESTOPEN.cob
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]