| 
      
      
      From: Mikael C. <SA...@id...> - 2002-02-08 15:39:27
       | 
| After upgrading from 0.55 to 0.56, I get a segmentation fault as soon as I try to run the program as compiled by 0.56. Can anyone give me any hints on how to link the program so that it doesn't crash?? :( A .tar file containing the project I'm working on including a shell script I've been using to compile&link it with can be found here: http://www.utb.hb.se/ida/sa9625/sov.tar Hope I don't have to go back to 0.55, since it seems as a whole lot of useful improvements in 0.56! :( - Mikael ---------------------------------------------------- Mikael Carneholm, B.Sc. Student at the Dep. of Computer Science and Business Administration UCB (University College of Bor=E5s) Sweden E-mail: sa...@id... | 
| 
      
      
      From: Gareth K. <gb...@th...> - 2003-04-26 14:36:50
       | 
| First time posting - so bare with me, if you don't mind.
I'm new to the tinyCobol compiler... and, for that matter, COBOL
I can compile this:
      1  IDENTIFICATION DIVISION.
      2  PROGRAM-ID. EG.
      3  DATA DIVISION.
      4  WORKING-STORAGE SECTION.
      5  01 test-input  PIC 99.
      6  01 test-working PIC 99.
      7  01 second-working PIC 99.
      8
      9  PROCEDURE DIVISION.
     10  eg.
     11      DISPLAY "Quick Example Program"
     12      DISPLAY "Enter a number: " WITH NO ADVANCING
     13      ACCEPT test-input
     14
     15      MULTIPLY test-input BY 2 GIVING test-working ROUNDED
     16      ON SIZE ERROR
     17          DISPLAY "Size Error"
     18      NOT ON SIZE ERROR
     19          DISPLAY "No Size Error"
     20          ADD test-working TO 80 GIVING second-working
     21 *        ON SIZE ERROR
     22 *            DISPLAY "Second size error"
     23 *        NOT ON SIZE ERROR
     24 *            DISPLAY "Second no size error"
     25          END-ADD
     26      END-MULTIPLY
     27
     28      STOP RUN.
( Line numbers are from vim :set number - I've found that oddly I can't have
seven characters at the start of each line - I can only have one ?
Is this normal ? Can I change it so that the compiler expects a normal cobol
line - with seven characters at the beginning )
And it works fine.
If I uncomment lines 21-24 then I get a Segmentation Fault...
Is this a known bug in the compiler, something wrong with my cobol,
something wrong with my compiler or something else ?
If any debug / verbose / system information is needed to work out what's
happening then I'll gladly give it.
TinyCOBOL - pre alpha 0.60.0 (released on 2002/10/04)
(C) 1991, 1993, 1999-2002 Rildo Pragana et. al.
Thanks a lot
Gareth Kirwan
Programming & Development,
Thermeon Europe Ltd,
gb...@th...
Tel: +44 (0) 1293 864 303
Thermeon Europe e-Card: gbjk
 | 
| 
      
      
      From: David E. <de...@ar...> - 2003-04-26 16:27:59
       | 
| On 26/04/03, Gareth Kirwan wrote: > ... > I've found that oddly I can't have seven characters > at the start of each line - I can only have one ? > Is this normal ? Can I change it so that the compiler > expects a normal COBOL line - with seven characters at > the beginning ) TC supports both fixed and free COBOL formats. You can override the default by using the command line options (-F=fixed or -X=free), or change the default in the resource file 'htcobolrc' as follows. From: PGM_FORMAT_FREE #PGM_FORMAT_FIXED to #PGM_FORMAT_FREE PGM_FORMAT_FIXED > ... > If I uncomment lines 21-24 then I get a Segmentation Fault... I tried to compile your example, on MinGW, and htcobol (not the COBOL program) will terminate with a segmentation fault. > Is this a known bug in the compiler, something wrong with my > COBOL, something wrong with my compiler or something else ? If is this is the problem you are encountering, then yes it is a bug. Hope this helps. | 
| 
      
      
      From: Gareth K. <gb...@th...> - 2003-04-26 16:42:22
       | 
| Thanks David. Surely this bug would have been noticed long ago... It seems that just putting one SIZE ERROR inside another causes it ? Do other people get this too ? Thanks Gareth > -----Original Message----- > From: tin...@li... > [mailto:tin...@li...]On > Behalf Of David > Essex > Sent: 26 April 2003 17:22 > To: tiny-cobol-users > Subject: Re: [Tiny-cobol-users] Segmentation fault > > > On 26/04/03, Gareth Kirwan wrote: > > > ... > > I've found that oddly I can't have seven characters > > at the start of each line - I can only have one ? > > Is this normal ? Can I change it so that the compiler > > expects a normal COBOL line - with seven characters at > > the beginning ) > > TC supports both fixed and free COBOL formats. > > You can override the default by using the command line > options (-F=fixed or > -X=free), or change the default in the resource file > 'htcobolrc' as follows. > > From: > PGM_FORMAT_FREE > #PGM_FORMAT_FIXED > to > #PGM_FORMAT_FREE > PGM_FORMAT_FIXED > > > > ... > > If I uncomment lines 21-24 then I get a Segmentation Fault... > > I tried to compile your example, on MinGW, and htcobol (not the COBOL > program) will terminate with a segmentation fault. > > > > Is this a known bug in the compiler, something wrong with my > > COBOL, something wrong with my compiler or something else ? > > If is this is the problem you are encountering, then yes it is a bug. > > > Hope this helps. > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Tin...@li... > https://lists.sourceforge.net/lists/listinfo/tiny-cobol-users > > | 
| 
      
      
      From: David E. <de...@ar...> - 2003-04-26 17:58:38
       | 
| On 26/04/03, Gareth Kirwan wrote: > Surely this bug would have been noticed long ago... Not necessarily. > It seems that just putting one SIZE ERROR inside another causes it ? Yes, it appears that nested 'ON SIZE ERROR' clauses will crash the compiler. Actually, I'm not sure if nested 'ON SIZE ERROR' clauses are permitted in COBOL 85. Could some one confirm this ? | 
| 
      
      
      From: Binyamin D. <bd...@di...> - 2003-04-26 19:15:35
       | 
| On Sat, 26 Apr 2003 13:51:09 -0400 David Essex <de...@ar...> wrote: :>On 26/04/03, Gareth Kirwan wrote: :>> Surely this bug would have been noticed long ago... :>Not necessarily. :>> It seems that just putting one SIZE ERROR inside another causes it ? :>Yes, it appears that nested 'ON SIZE ERROR' clauses will crash the compiler. :>Actually, I'm not sure if nested 'ON SIZE ERROR' clauses are permitted in :>COBOL 85. Can't think of a reason why they would not be permitted. -- Binyamin Dissen <bd...@di...> http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel | 
| 
      
      
      From: Jim M. <ji...@by...> - 2003-06-19 09:01:22
       | 
| I seem to have run into a problem.
I am using a script called "comp" to run the compiler and line 34 of the
script is the actual "htcobol" command.
I keep getting the following error message:
comp:line34: 14503 Segmentation fault
                   htcobol -c -g -C -F -P -I $COBCPY $PROG.cbl
return code 139
I think I may have hit some kind of limit on the compiler.  If I "comment
out" any line defining a variable in the WORKING-STORAGE SETCTION, then it
compiles correctly.  As soon as I remove the comment, the compiler crashes.
Even if I just comment out a line like this, it works:
01  FILLER                 PIC X(4)             VALUE "L20".
The number "14503" reported in the error message changes slightly as I
comment out different variables, but always seems to stay between 14500 and
14600.
Jim
 | 
| 
      
      
      From: eurlix <eu...@li...> - 2003-06-19 19:03:40
       | 
| Hi Jim, Le Thu, 19 Jun 2003 12:28:48 +0800 "Jim Morcombe" <ji...@by...> a =E9crit: > I seem to have run into a problem. > I am using a script called "comp" to run the compiler and line 34 of > the script is the actual "htcobol" command. >=20 > I keep getting the following error message: >=20 > comp:line34: 14503 Segmentation fault > htcobol -c -g -C -F -P -I $COBCPY $PROG.cbl >=20 > return code 139 >=20 > I think I may have hit some kind of limit on the compiler. If I > "comment out" any line defining a variable in the WORKING-STORAGE > SETCTION, then it compiles correctly. As soon as I remove the > comment, the compiler crashes. >=20 > Even if I just comment out a line like this, it works: >=20 > 01 FILLER PIC X(4) VALUE "L20". >=20 > The number "14503" reported in the error message changes slightly as > I comment out different variables, but always seems to stay between > 14500 and 14600. >=20 > Jim >=20 >=20 As I have EXACTLY the same problem on about 30% of 450/500 programs, I am curious to read what appen if you _only_ add a line like 77 filler pic x value space. in your program . I suppose that you works with win*something, but this work for me with Linux from sometime ;-) Regards, --=20 Alain Lucari (Eurlix) | 
| 
      
      
      From: Jim M. <ro...@vi...> - 2003-06-20 01:33:42
       | 
| Alain I am using Red Hat Linix 8.0 Even if I just add "77 FILLER PIC X Value SPACES." then the erro= r occurs. If you are having the same problem, then it looks as if there is a bug in the compiler somewhere. I was hoping that the program had simply exceeded some parameter that is related to the number of WORKING STORAGE VARIABLES you can have. In whic= h case it might be easy to fix. My programs all have fairly large WORKING STORAGE sections. The programs= I am testing are much smaller than a lot of other programs I would like to compile. Have you noticed any other factors that affect getting the error in your programs? Jim ----- Original Message ----- From: eurlix <eu...@li...> To: <tin...@li...> Sent: Friday, June 20, 2003 3:03 AM Subject: Re: [Tiny-cobol-users] Segmentation fault > Hi Jim, > > Le Thu, 19 Jun 2003 12:28:48 +0800 > "Jim Morcombe" <ji...@by...> a =E9crit: > > > I seem to have run into a problem. > > I am using a script called "comp" to run the compiler and line 34 of > > the script is the actual "htcobol" command. > > > > I keep getting the following error message: > > > > comp:line34: 14503 Segmentation fault > > htcobol -c -g -C -F -P -I $COBCPY $PROG.cbl > > > > return code 139 > > > > I think I may have hit some kind of limit on the compiler. If I > > "comment out" any line defining a variable in the WORKING-STORAGE > > SETCTION, then it compiles correctly. As soon as I remove the > > comment, the compiler crashes. > > > > Even if I just comment out a line like this, it works: > > > > 01 FILLER PIC X(4) VALUE "L20". > > > > The number "14503" reported in the error message changes slightly as > > I comment out different variables, but always seems to stay between > > 14500 and 14600. > > > > Jim > > > > > As I have EXACTLY the same problem on about 30% of 450/500 programs, > I am curious to read what appen if you _only_ add a line like > 77 filler pic x value space. > in your program . > > I suppose that you works with win*something, but this work for me > with Linux from sometime ;-) > > Regards, > -- > Alain Lucari (Eurlix) > > > ------------------------------------------------------- > This SF.Net email is sponsored by: INetU > Attention Web Developers & Consultants: Become An INetU Hosting Partner. > Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission= ! > INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php > _______________________________________________ > Tin...@li... > https://lists.sourceforge.net/lists/listinfo/tiny-cobol-users > | 
| 
      
      
      From: David E. <de...@ar...> - 2003-06-20 04:21:18
       | 
| On 19/06/03, Jim Morcombe wrote: > I seem to have run into a problem. > I am using a script called "comp" to run > the compiler and line 34 of the script is > the actual "htcobol" command. > > I keep getting the following error message: > > comp:line34: 14503 Segmentation fault > htcobol -c -g -C -F -P -I $COBCPY $PROG.cbl > return code 139 > > I think I may have hit some kind of limit on the compiler. > If I "comment out" any line defining a variable in the > WORKING-STORAGE SECTION, then it compiles correctly. > As soon as I remove the comment, the compiler crashes. > > Even if I just comment out a line like this, it works: > > 01 FILLER PIC X(4) VALUE "L20". > > The number "14503" reported in the error message changes slightly > as I comment out different variables, but always seems to stay > between 14500 and 14600. There is a compiler limit, which may, or not, be the cause of this problem. I have forgotten the details, but it should not seg fault, as there was some code to trap the error. Could you send me some sample code, which I could test ? | 
| 
      
      
      From: Jim M. <ro...@vi...> - 2003-06-20 03:19:16
       | 
| My theory that the segmentation fault was caused by exceeding some kind of limit is wrong. The error has turned up straight after I have deleted some WORKING STORAGE lines. This error is making the compiler unusable. | 
| 
      
      
      From: Rod S. <rod...@ya...> - 2003-10-20 02:05:35
       | 
| I have a program was compiled and running with no errors until I made a small change. Now I have no syntax errors but I get a Segmentation fault error during the compile. Is there a way for me to find out what the Segmentation fault error is? Rod Schell rod...@ya... __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com | 
| 
      
      
      From: Hudson R. <hud...@gm...> - 2003-10-20 03:35:12
       | 
| Hi Rod, > I have a program was compiled and running with no > errors until I made a small change. Now I have no > syntax errors but I get a Segmentation fault error > during the compile. Is there a way for me to find out > what the Segmentation fault error is? Try to put a filler in the first field in your working-storage section or use a switch "-P" in compilation. Hudson. -- NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien... Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService Jetzt kostenlos anmelden unter http://www.gmx.net +++ GMX - die erste Adresse für Mail, Message, More! +++ | 
| 
      
      
      From: David E. <de...@ar...> - 2003-10-20 17:56:11
       | 
| On 19/10/03, Rod Schell wrote: > I have a program was compiled and running with no > errors until I made a small change. > Now I have no syntax errors but I get a Segmentation > fault error during the compile. > Is there a way for me to find out what the Segmentation > fault error is? Yes there is. The compiler must compiled with the debugging information, or the '-g' flag. This is not the default. First, delete or rename the old TC binary. Compile the compiler 'htcobol' using the debug flag '-g'. This can be done using the 'configure --enable-debug-all' flag, or by the manual addition of the '-g' flag to the 'compiler' make files. Copy or install the new compiler binary. Now use GDB to trace execution as follows. $gdb htcobol (gdb) r -P -v source.cob (gdb) ... (gdb) ba (gdb) q This will normally give you the source file and line were the segmentation fault occurs. Alternatively you could send me the source code. Hope this helps. | 
| 
      
      
      From: Adrian P. <adr...@sy...> - 2003-10-22 13:32:55
       | 
| Will the RECORD CONTAINS clause/statement ever be added to TC?
eg:
       FD F01-VEHICLE-FILE
           RECORD CONTAINS 89 CHARACTERS
           DATA RECORD IS F01-VEHICLE-RECORD.
Adrian
 | 
| 
      
      
      From: David E. <de...@ar...> - 2003-10-22 17:01:16
       | 
| On 20/10/03, Adrian Parker wrote: > Will the RECORD CONTAINS clause/statement ever > be added to TC? > > e.g.: > FD F01-VEHICLE-FILE > RECORD CONTAINS 89 CHARACTERS > DATA RECORD IS F01-VEHICLE-RECORD. The short answer is yes, eventually. Since the record lengths are determined by the record descriptions, the 'RECORD CONTAINS integer-1 CHARACTERS' clause would be treated as a comment, and ignored. As to the reason why TC is generating an 'UNIMPLEMENTED' error, is to trap certain types of variable record length records. Specifically the 'RECORD CONTAINS integer-1 TO integer-1 CHARACTERS' clause. | 
| 
      
      
      From: David E. <de...@ar...> - 2003-10-22 20:43:52
       | 
| David Essex wrote: > On 20/10/03, Adrian Parker wrote: > >> Will the RECORD CONTAINS clause/statement ever >> be added to TC? >> >> e.g.: >> FD F01-VEHICLE-FILE >> RECORD CONTAINS 89 CHARACTERS >> DATA RECORD IS F01-VEHICLE-RECORD. > > The short answer is yes, eventually. > > Since the record lengths are determined by the record descriptions, > the 'RECORD CONTAINS integer-1 CHARACTERS' clause would be treated > as a comment, and ignored. > > As to the reason why TC is generating an 'UNIMPLEMENTED' error, is > to trap certain types of variable record length records. > > Specifically the 'RECORD CONTAINS integer-1 TO integer-1 CHARACTERS' > clause. The 'RECORD CONTAINS integer-1 CHARACTERS' clause has been added to the parser on CVS. The 'RECORD CONTAINS integer-1 TO integer-1 CHARACTERS' clause will still be trapped as an error. | 
| 
      
      
      From: Mahesh .P. M. <mah...@ya...> - 2005-03-28 09:03:40
       | 
| Hi all, I am using TinyCOBOL on a local Linux FC3 distro to compile my cobol progs. I need help regarding the syntax to be used in the FD statement. How do I bind the cobol file name with an actual external file in the file system. I have tried SELECT myFile ASSIGN TO DISK and then FD myFile LABEL RECORDS ARE STANDARD EXTERNAL FILE IS 'infile'. This gives me a SEGMENTATION FAULT error on compiling. If I don't give the external file clause it throws the error that no external file is assigned. How to solve this ? All responses welcome. Thanks!! Send instant messages to your online friends http://uk.messenger.yahoo.com | 
| 
      
      
      From: Rildo J. C. P. <ril...@gl...> - 2005-03-28 13:03:52
       | 
| Hi Mahesh,
Mahesh .P. Mallia wrote:
>Hi all, 
>I am using TinyCOBOL on a local Linux FC3 distro to
>compile my cobol progs. I need help regarding the
>syntax to be used in the FD statement. How do I bind
>the cobol file name with an actual external file in
>the file system. 
>I have tried SELECT myFile ASSIGN TO DISK and then  
>FD myFile LABEL RECORDS ARE STANDARD EXTERNAL FILE IS
>'infile'. This gives me a SEGMENTATION FAULT error on
>compiling. If I don't give the external file clause it
>throws the error that no external file is assigned.
>How to solve this ?  
>All responses welcome. 
>Thanks!!
>  
>
You must declare your file name in the FILE-CONTROL section like the
example below. The FD clause is just for declaring the record layout,
not to assign it to any external file.  There are many examples in our
test.code directory.
FILE-CONTROL.
     SELECT myFile ASSIGN TO "infile"
     ...
best regards,
Rildo
-- 
  ------------------------------------------------------------------
  Rildo Pragana                   FPGA/uControllers * Linux * tcl/tk
  R.Joaquim Nabuco,92/1102 Derby  http://www.pragana.net
  Recife, PE - Brazil 52011-000   +55-81-3223-5694  / 8837-6122
 | 
| 
      
      
      From: David E. <de...@us...> - 2005-03-31 22:32:41
       | 
| Mahesh .P. Mallia wrote:
 > I am using TinyCOBOL on a local Linux FC3 distro to
 > compile my cobol progs. I need help regarding the
 > syntax to be used in the FD statement. How do I bind
 > the cobol file name with an actual external file in
 > the file system.
 > I have tried
 >
 > SELECT myFile ASSIGN TO DISK
 >
 > and then
 >
 > FD myFile
 > EXTERNAL
 > LABEL RECORDS ARE STANDARD
 > FILE IS 'infile'.
 >
 > This gives me a SEGMENTATION FAULT error on
 > compiling. If I don't give the external file clause it
 > throws the error that no external file is assigned.
 > How to solve this ?
TC does not have a ' FILE IS ...' clause.
It does have a  'VALUE OF FILE-ID IS { literal | identifier }' clause.
The 'EXTERNAL' clause will not work as in the example above. This is a bug.
However, you can bind the internal file name with the external
file-system  file name by using the 'EXTERNAL' clause in the 'SELECT'
statement .
The syntax is a follows.
SELECT ... ASSIGN TO EXTERNAL { variable | literal }
The 'EXTERNAL' clause in the 'SELECT' statement can be used to
relate internal to external filenames at run time, by using
environment variables.
An example of this can be found in 'test.code/t19/test19a.cob'.
 | 
| 
      
      
      From: Jim M. <ro...@vi...> - 2005-07-13 05:03:06
       
        
          
            Attachments:
            jimtest.cbl
          
        
       | 
| I have attached a Cobol program that crashes the compiler with a segmentation fault. Here is the output ------------------------------------------ We are about to compile : jimtest /home/jim/bin/int: line 52: 2524 Segmentation fault htcobol -c -g -C -D -F -P -I $COBCPY -I $IO $PROG.cbl Woops! The compiler returned error : 139 [jim@byrlin3 work]$ ------------------------------------------------- I'm sorry I couldn't give you a shorter example, but the error disappears every time I delete a few lines of code. The error seems so flaky that I won't be surprised if you can't reproduce it. Our programing standards state that we shouldn't use "SECTIONS" in the PROCEDURE DIVISION, so I have little experience with the effects of SECTIONS. If I change the "MAINLINE SECTION" statement on line 212 to be just "MAINLINE" then the error goes away. Alternatively, If I move line 211 to line 213 the error also goes away. That is, when I move the statement PERFORM GET-DATABASE-TYPE. to be after the "MAINLINE SECTION" the error goes away. Alternatively, if I comment out line 254 - DISPLAY "SEARCH-ACCOUNT = " SEARCH-ACCOUNT. Then the error disappears. Alternatively, If I just delete apparently random lines of code, the error disappears. Jim | 
| 
      
      
      From: David E. <de...@us...> - 2005-07-13 06:36:24
       | 
| Jim Morcombe wrote:
 > I have attached a Cobol program that crashes the compiler with a
 > segmentation fault.
 > ...
Jim, trying to debug the TC compiler can be a real pain at times.
Trying isolate the problem with the code you enclosed will not work as 
it contains COPYBOOKS.
This leaves two options.
Try to isolate the bug yourself, which is not difficult but can be 
problematic.
Or, assuming that it is a viable option, send me the the complete source 
including the COPYBOOKS, and I will try to duplicate the problem on the 
CVS version.
If you would like to try to isolate the problem first, then just do the 
following.
1) Compile the TC compiler (RT not required) with the GCC '-g' option.
2) In the same directory as $PROG.cbl, create a '.gdbinit' file and
    add the following line.
    'r -c -g -C -D -F -P -I $COBCPY -I $IO $PROG.cbl'
3) initialize the environment variables.
    export COBCPY=...
4) Run GDB
    gdb htcobol
This should give you output some thing like the following.
 | 
| 
      
      
      From: Jeff S. <why...@ya...> - 2002-02-08 16:37:41
       | 
| Mikael, Several significant changes were made (including some of my own) shortly before 0.56 came out. Some of these (including some of my own) introduced secondary bugs. The worst to my knowledge, and what is likely the problem in your case, is the SCREEN section was severely broken. I believe we have, for the most part, got it stable again. So you should try out the version in CVS if that is at all possible. - Jeff Smith --- Mikael Carneholm <SA...@id...> wrote: > After upgrading from 0.55 to 0.56, I get a > segmentation fault as > soon as I try to run the program as compiled by > 0.56. > > Can anyone give me any hints on how to link the > program so that it > doesn't crash?? :( > > A .tar file containing the project I'm working on > including a shell > script I've been using to compile&link it with can > be found here: > > http://www.utb.hb.se/ida/sa9625/sov.tar > > Hope I don't have to go back to 0.55, since it seems > as a whole lot > of useful improvements in 0.56! :( > > - Mikael __________________________________________________ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com |