From: Jim M. <ji...@by...> - 2003-06-20 07:55:43
|
David I have another example of a Segmentation Fault. This time I can make the error go away by removing a line in the Procedure Division. Do you want me to send this example, or do you have enough to work with? Jim |
From: <ra...@gr...> - 2005-06-16 12:53:07
|
<html>Hi,<BR> <BR> I am getting "segmentation fault" error while I am executing program. The program is the result of compilation of called and calling program. Compilation goes fine. When I run gdb the output is as follows:<BR> <BR> [Thread debugging using lib thread_db enabled]<BR> [New Thread - 151214400 (LWP 7591)]<BR> Program received signal SIGSEGV, segmentation fault<BR> [Switching Thread - 151214400 (LWP 7591)]<BR> 0x00a5e4da in memcpy () from /lib/tls/libc.so.6<BR> <BR> I am using TC 0.62 on Fedora Core 3 linux.<BR> <BR> TIA<BR> Ravi<BR> <BR></html> |
From: David E. <de...@us...> - 2005-06-16 18:04:58
|
> I am getting "segmentation fault" error while I am > executing program. > The program is the result of compilation of called and > calling program. Compilation goes fine. > When I run gdb the output is as follows: A "segmentation fault", when using main and sub-programs, can be caused by improper parameter passing. > [Thread debugging using lib thread_db enabled] > [New Thread - 151214400 (LWP 7591)] > Program received signal SIGSEGV, segmentation fault > [Switching Thread - 151214400 (LWP 7591)] > 0x00a5e4da in memcpy () from /lib/tls/libc.so.6 > > I am using TC 0.62 on Fedora Core 3 linux. First, TC does not have any native support for 'Threads'. Since the TC stabs generation, required by GDB, is not being maintained, it is not recommended that GDB be used to debug TC programs. The old fashioned 'DISPLAY' statement should work, in isolating the problem statement. |
From: Reg <re...@ri...> - 2007-09-05 12:14:25
|
Is there a size limit for TC programs? Using latest Fedora/gcc/etc. get compiler fail on "Segmentation Fault" with larger programs which compile and run perfectly with OpenCobol, Acu, MF. Anyone any ideas? Reg. -- View this message in context: http://www.nabble.com/Segmentation-Fault-tf4383688.html#a12496784 Sent from the tiny-cobol-users mailing list archive at Nabble.com. |
From: David E. <de...@us...> - 2007-09-06 06:01:03
|
Reg wrote: > Is there a size limit for TC programs? > Using latest Fedora/gcc/etc. get compiler fail > on "Segmentation Fault" with larger programs > which compile and run perfectly with OpenCobol, Acu, MF. > Anyone any ideas? There is no specific source SIZE limit on TC. But, no stress tests have been performed using source code SIZE as a parameter. I have compiled and run fairly large programs, but but then again it depends on what is considered a 'large program'. In any case I suspect this to be some sort of bug, and without a sample to test there is no way to trace it. If you are feeling adventurous, you can compile the TC source with the '-g' option, then use GDB to isolate the seg-fault location. Hope this helps. PS. Please do not post any large and/or proprietary source code) |
From: Reg <re...@ri...> - 2007-09-06 09:05:45
|
David Essex-2 wrote: > > Reg wrote: > > > Is there a size limit for TC programs? > > Using latest Fedora/gcc/etc. get compiler fail > > on "Segmentation Fault" with larger programs > > which compile and run perfectly with OpenCobol, Acu, MF. > > Anyone any ideas? > > There is no specific source SIZE limit on TC. > > But, no stress tests have been performed using source code SIZE as a > parameter. > > I have compiled and run fairly large programs, but > but then again it depends on what is considered a 'large program'. > > In any case I suspect this to be some sort of bug, and without a sample > to test there is no way to trace it. > > If you are feeling adventurous, you can compile the TC source with the > '-g' option, then use GDB to isolate the seg-fault location. > > > Hope this helps. > > PS. > Please do not post any large and/or proprietary source code) > > Hi David, > Thanks for rapid response. > Doesn't seem to matter which source code, so looks like compiler bug. > Will debug it when I get chance, probably about 3 or 4 weeks. > Meanwhile, I seem to recall someone muttering about gcc 3 returning a > yes/ok instead of a 0/1 or vice versa on a memory alloc, so might try > running on an older machine. > Regards, > Reg. > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Tin...@li... > https://lists.sourceforge.net/lists/listinfo/tiny-cobol-users > > -- View this message in context: http://www.nabble.com/Segmentation-Fault-tf4383688.html#a12518261 Sent from the tiny-cobol-users mailing list archive at Nabble.com. |
From: David E. <de...@us...> - 2007-09-06 18:15:53
|
Reg wrote: > ... >> Thanks for rapid response. >> Doesn't seem to matter which source code, so >> looks like compiler bug. >> Will debug it when I get chance, probably >> about 3 or 4 weeks. >> Meanwhile, I seem to recall someone muttering >> about gcc 3 returning a yes/ok instead of a 0/1 >> or vice versa on a memory alloc, so might try >> running on an older machine. The latest release (and CVS) was developed using GCC3x. AFAIK, TC was never tested on any GCC4. And there were some problems reported. I don't recall the specifics. If you are feeling REALLY adventurous, you could try the current 'new and improved' CVS version. Cheers PS. How to download CVS version using anonymous CVS: cvsopts='-da...@ti...:/cvsroot/tiny-cobol' cvs $cvsopts login Password: <enter> cvs -z3 $cvsopts co -P development |
From: Reg <re...@ri...> - 2007-09-06 19:45:27
|
David Essex-2 wrote: > > Reg wrote: > > > ... > >> Thanks for rapid response. > >> Doesn't seem to matter which source code, so > >> looks like compiler bug. > >> Will debug it when I get chance, probably > >> about 3 or 4 weeks. > >> Meanwhile, I seem to recall someone muttering > >> about gcc 3 returning a yes/ok instead of a 0/1 > >> or vice versa on a memory alloc, so might try > >> running on an older machine. > > The latest release (and CVS) was developed using GCC3x. > > AFAIK, TC was never tested on any GCC4. And there were some problems > reported. I don't recall the specifics. > > If you are feeling REALLY adventurous, you could try the current 'new > and improved' CVS version. > > Cheers > > PS. > How to download CVS version using anonymous CVS: > cvsopts='-da...@ti...:/cvsroot/tiny-cobol' > cvs $cvsopts login > Password: <enter> > cvs -z3 $cvsopts co -P development > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Tin...@li... > https://lists.sourceforge.net/lists/listinfo/tiny-cobol-users > > Thanks David, will follow up..... eventually. Currently sinking under workload, but still keen on sorting this. Any idea when CVS moving to stable? Regards, Reg. -- View this message in context: http://www.nabble.com/Segmentation-Fault-tf4383688.html#a12530034 Sent from the tiny-cobol-users mailing list archive at Nabble.com. |
From: Reg <re...@ri...> - 2007-09-30 10:34:03
|
Reg wrote: > > > > David Essex-2 wrote: >> >> Reg wrote: >> >> > ... >> >> Thanks for rapid response. >> >> Doesn't seem to matter which source code, so >> >> looks like compiler bug. >> >> Will debug it when I get chance, probably >> >> about 3 or 4 weeks. >> >> Meanwhile, I seem to recall someone muttering >> >> about gcc 3 returning a yes/ok instead of a 0/1 >> >> or vice versa on a memory alloc, so might try >> >> running on an older machine. >> >> The latest release (and CVS) was developed using GCC3x. >> >> AFAIK, TC was never tested on any GCC4. And there were some problems >> reported. I don't recall the specifics. >> >> If you are feeling REALLY adventurous, you could try the current 'new >> and improved' CVS version. >> >> Cheers >> >> PS. >> How to download CVS version using anonymous CVS: >> cvsopts='-da...@ti...:/cvsroot/tiny-cobol' >> cvs $cvsopts login >> Password: <enter> >> cvs -z3 $cvsopts co -P development >> >> >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> Tin...@li... >> https://lists.sourceforge.net/lists/listinfo/tiny-cobol-users >> >> > Thanks David, will follow up..... eventually. > Currently sinking under workload, but still keen on sorting this. > Any idea when CVS moving to stable? > Regards, > Reg. > Hi Again, David. Can't login to the repository, as follows:- ******************************************************************** [root@Appserver viewvc-1.0.4]# cvsopts='-da...@ti...:/cvsroot/tiny-cobol' [root@Appserver viewvc-1.0.4]# cvs $cvsopts login cvs login: can only use `login' command with the 'pserver' method cvs [login aborted]: CVSROOT: ano...@ti...:/cvsroot/tiny-cobol [root@Appserver viewvc-1.0.4]# cvs $cvsopts Usage: cvs [cvs-options] command [command-options-and-arguments] where cvs-options are -4, -6,-q, -n, etc. (specify --help-options for a list of options) where command is add, admin, etc. (specify --help-commands for a list of commands or --help-synonyms for a list of command synonyms) where command-options-and-arguments depend on the specific command (specify -H followed by a command name for command-specific help) Specify --help to receive this message The Concurrent Versions System (CVS) is a tool for version control. For CVS updates and additional information, see the CVS home page at http://cvs.nongnu.org/ [root@Appserver viewvc-1.0.4]# cvs -H Usage: cvs [cvs-options] command [command-options-and-arguments] where cvs-options are -4, -6,-q, -n, etc. (specify --help-options for a list of options) where command is add, admin, etc. (specify --help-commands for a list of commands or --help-synonyms for a list of command synonyms) where command-options-and-arguments depend on the specific command (specify -H followed by a command name for command-specific help) Specify --help to receive this message The Concurrent Versions System (CVS) is a tool for version control. For CVS updates and additional information, see the CVS home page at http://cvs.nongnu.org/ [root@Appserver viewvc-1.0.4]# cvs -H login Usage: cvs login (Specify the --help global option for a list of other help options) [root@Appserver viewvc-1.0.4]# cvs -z3 $cvsopts co -P development The authenticity of host 'tiny-cobol.cvs.sourceforge.net (66.35.250.90)' can't be established. RSA key fingerprint is 13:f1:65:c3:6c:b7:7e:a5:f0:f3:f5:19:f4:42:9c:4a. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'tiny-cobol.cvs.sourceforge.net,66.35.250.90' (RSA) to the list of known hosts. ano...@ti...'s password: ano...@ti...'s password: Permission denied, please try again. ano...@ti...'s password: Permission denied, please try again. Permission denied (publickey,gssapi-with-mic,password). cvs [checkout aborted]: end of file from server (consult above messages if any) [root@Appserver viewvc-1.0.4]# cvs -z3 $cvsopts co -P development ano...@ti...'s password: ano...@ti...'s password: Permission denied, please try again. ******************************************************************************* What is the "pserver method"? Or can you email me a password directly? Regards, Reg. -- View this message in context: http://www.nabble.com/Segmentation-Fault-tf4383688.html#a12964443 Sent from the tiny-cobol-users mailing list archive at Nabble.com. |
From: David E. <de...@us...> - 2007-10-03 01:39:40
|
Reg wrote: > Made changes, got:- > #htcobol -z -m -C -I . GCMMSTMN.COB > ... > searching directory path '.' > found copybook name './ICILOG.FD' > *** glibc detected *** htcobol: > malloc(): memory corruption: 0x091c9278 *** > ... > Aborted > Seems to have moved problem somewhere else..... Yes, looks like it, but that is to be expected. Trying to isolate stray C pointers can be a real pain. One more thing you may wish to try. Have a look at the copybook 'ICILOG.FD'. The TC pre-processor some times will malfunction, especially with single/double quotes. Cheers. |
From: David E. <de...@us...> - 2007-09-06 21:39:07
|
Reg wrote: > Thanks David, will follow up..... eventually. > Currently sinking under workload, but still > keen on sorting this. > Any idea when CVS moving to stable? Well, it is policy to keep SF CVS stable. Meaning that it should compile and run. The current SF CVS version should be relatively stable. It passed the 'test_suite' tests. But a large number of changes have been made to the sources, especially in the RTL. So further testing will be required. For example the indexed file IO RTL has been radically changed. Indexed files are now stored using a data (.dat) file and a index file (.dbx). This makes indexed files incompatible with files created with previous versions of TC. In any case, any feedback regarding current SF CVS version, would be appreciated. Cheers |
From: Reg <re...@ri...> - 2007-09-06 23:33:23
|
David Essex-2 wrote: > > Reg wrote: > > > Thanks David, will follow up..... eventually. > > Currently sinking under workload, but still > > keen on sorting this. > > Any idea when CVS moving to stable? > > Well, it is policy to keep SF CVS stable. Meaning that it should compile > and run. > > The current SF CVS version should be relatively stable. It passed the > 'test_suite' tests. > > But a large number of changes have been made to the sources, especially > in the RTL. So further testing will be required. > > For example the indexed file IO RTL has been radically changed. > Indexed files are now stored using a data (.dat) file and a index file > (.dbx). > This makes indexed files incompatible with files created with previous > versions of TC. > > In any case, any feedback regarding current SF CVS version, would be > appreciated. > > Cheers > > Wow, back to IS fundamentals! Well, that should speed things up > performance-wise. > I will get back onto this when I can, and will be back in touch. > Meanwhile, thanks again for your help. > Regards, > Reg. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Tin...@li... > https://lists.sourceforge.net/lists/listinfo/tiny-cobol-users > > -- View this message in context: http://www.nabble.com/Segmentation-Fault-tf4383688.html#a12533437 Sent from the tiny-cobol-users mailing list archive at Nabble.com. |
From: David E. <de...@us...> - 2007-09-30 17:13:09
|
Reg wrote: > ... > What is the "pserver method"? > Or can you email me a password directly? When down loading using anonymous CVS no password is required. Try the following, it should work. cvsopts='-d:pserver:ano...@ti...:/cvsroot/tiny-cobol' cvs $cvsopts login Password: <just press enter> cvs -z3 $cvsopts co -P development If this fails check the TC project SF web site (1), as some times they do make small changes. Hope this helps. 1) TC project SF web site http://www.sf.net/projects/tiny-cobol/ |
From: Reg <re...@ri...> - 2007-09-30 22:53:23
|
David Essex-2 wrote: > > Reg wrote: > > ... > > What is the "pserver method"? > > Or can you email me a password directly? > > When down loading using anonymous CVS no password is required. > > Try the following, it should work. > > cvsopts='-d:pserver:ano...@ti...:/cvsroot/tiny-cobol' > > > cvs $cvsopts login > Password: <just press enter> > cvs -z3 $cvsopts co -P development > > If this fails check the TC project SF web site (1), as some times they > do make small changes. > > Hope this helps. > > 1) TC project SF web site > http://www.sf.net/projects/tiny-cobol/ > > Hi, Tried it but:- > ******************************************** > [root@Appserver viewvc-1.0.4]# > cvsopts='-d:pserver:anonymous@...:/cvsroot/tiny-cobol' > [root@Appserver viewvc-1.0.4]# cvs $cvsopts login > Logging in to :pserver:anonymous@...:2401/cvsroot/tiny-cobol > CVS password: > Unknown host .... > [root@Appserver viewvc-1.0.4]# cvs -z3 $cvsopts co -P development > Unknown host .... > [root@Appserver viewvc-1.0.4]# > ************************************************* > No joy! > Regards, > Reg. > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Tin...@li... > https://lists.sourceforge.net/lists/listinfo/tiny-cobol-users > > -- View this message in context: http://www.nabble.com/Segmentation-Fault-tf4383688.html#a12971181 Sent from the tiny-cobol-users mailing list archive at Nabble.com. |
From: Reg <re...@ri...> - 2007-09-30 22:58:08
|
Reg wrote: > > > > David Essex-2 wrote: >> >> Reg wrote: >> > ... >> > What is the "pserver method"? >> > Or can you email me a password directly? >> >> When down loading using anonymous CVS no password is required. >> >> Try the following, it should work. >> >> cvsopts='-d:pserver:ano...@ti...:/cvsroot/tiny-cobol' >> >> >> cvs $cvsopts login >> Password: <just press enter> >> cvs -z3 $cvsopts co -P development >> >> If this fails check the TC project SF web site (1), as some times they >> do make small changes. >> >> Hope this helps. >> >> 1) TC project SF web site >> http://www.sf.net/projects/tiny-cobol/ >> >> Hi, Tried it but:- >> ******************************************** >> [root@Appserver viewvc-1.0.4]# >> cvsopts='-d:pserver:anonymous@...:/cvsroot/tiny-cobol' >> [root@Appserver viewvc-1.0.4]# cvs $cvsopts login >> Logging in to :pserver:anonymous@...:2401/cvsroot/tiny-cobol >> CVS password: >> Unknown host .... >> [root@Appserver viewvc-1.0.4]# cvs -z3 $cvsopts co -P development >> Unknown host .... >> [root@Appserver viewvc-1.0.4]# >> ************************************************* >> No joy! >> Regards, >> Reg. >> >> >> OOOOPS! >> Just checked my typing again, apologies, it does work! >> Thanks very much. >> Sorry again, >> Regards, >> Reg. >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Tin...@li... >> https://lists.sourceforge.net/lists/listinfo/tiny-cobol-users >> >> > > -- View this message in context: http://www.nabble.com/Segmentation-Fault-tf4383688.html#a12971198 Sent from the tiny-cobol-users mailing list archive at Nabble.com. |
From: Reg <re...@ri...> - 2007-10-01 09:30:49
|
Hi David, Eventually loaded/installed dev htcobol, compiled same program, got same segmentation fault. In desperation, juggled order of loading of FD copybooks, got ABORT thru memory problem. Any ideas? PS Out of time again, so no hurry in replying. root@Appserver TinyCat]# htcobol -z -m -C -F -I . GCMMSTMN.COB Appending '.' to include (copybooks) search path GEC=> path: () base (GCMMSTMN) ext: (.COB) Pre-processing 'GCMMSTMN.COB' Output intermidiate file 'GCMMSTMN.i' searching directory path '.' found copybook name './BIGSA.CF' searching directory path '.' found copybook name './DATAPUT.SA' searching directory path '.' found copybook name './LANGFILE.SA' searching directory path '.' found copybook name './LANGTXT.SA' searching directory path '.' found copybook name './LANGLOG.SA' searching directory path '.' found copybook name './REPFILE.SA' searching directory path '.' found copybook name './VLSTOR.SA' searching directory path '.' found copybook name './TLSTOR.SA' searching directory path '.' found copybook name './PRTFILE.SA' searching directory path '.' found copybook name './SUPMAST.SA' searching directory path '.' found copybook name './INVCS.SA' searching directory path '.' found copybook name './SELFILE.SA' searching directory path '.' found copybook name './POUT.SA' searching directory path '.' found copybook name './PASWRD.SA' searching directory path '.' found copybook name './CURRFILE.SA' searching directory path '.' found copybook name './CURRRATE.SA' searching directory path '.' found copybook name './VATFILE.SA' searching directory path '.' found copybook name './ACHART.SA' searching directory path '.' found copybook name './TRANS.SA' searching directory path '.' found copybook name './FIXCURR.SA' searching directory path '.' found copybook name './DESCS.SA' searching directory path '.' found copybook name './LNDESCS.SA' searching directory path '.' found copybook name './ICILOG.SA' searching directory path '.' found copybook name './ICICODE.SA' searching directory path '.' found copybook name './ICIUNIT.SA' searching directory path '.' found copybook name './ICIMCYCL.SA' searching directory path '.' found copybook name './ICIHOL.SA' searching directory path '.' found copybook name './BIGFD.CF' searching directory path '.' found copybook name './DATAPUT.FD' searching directory path '.' found copybook name './LANGFILE.FD' searching directory path '.' found copybook name './LANGTXT.FD' searching directory path '.' found copybook name './LANGLOG.FD' searching directory path '.' found copybook name './REPFILE.FD' searching directory path '.' found copybook name './VLSTOR.FD' searching directory path '.' found copybook name './TLSTOR.FD' searching directory path '.' found copybook name './PRTFILE.FD' searching directory path '.' found copybook name './CURRFILE.FD' searching directory path '.' found copybook name './CURRRATE.FD' searching directory path '.' found copybook name './VATFILE.FD' searching directory path '.' found copybook name './ACHART.FD' searching directory path '.' found copybook name './TRANS.FD' searching directory path '.' found copybook name './FIXCURR.FD' searching directory path '.' found copybook name './DESCS.FD' searching directory path '.' found copybook name './LNDESCS.FD' searching directory path '.' found copybook name './ICILOG.FD' *** glibc detected *** htcobol: malloc(): memory corruption: 0x09bbe278 *** ======= Backtrace: ========= /lib/libc.so.6[0xcb013c] /lib/libc.so.6(__libc_malloc+0x7e)[0xcb12de] /lib/libc.so.6[0xc9f13f] /lib/libc.so.6(fopen+0x2c)[0xc9f20c] htcobol[0x805865f] htcobol[0x8056336] htcobol[0x805431e] htcobol[0x806f89e] htcobol[0x805903f] /lib/libc.so.6(__libc_start_main+0xdc)[0xc5edec] htcobol[0x8048f01] ======= Memory map: ======== 00110000-00111000 r-xp 00110000 00:00 0 [vdso] 00c2c000-00c45000 r-xp 00000000 fd:00 2687014 /lib/ld-2.5.so 00c45000-00c46000 r-xp 00019000 fd:00 2687014 /lib/ld-2.5.so 00c46000-00c47000 rwxp 0001a000 fd:00 2687014 /lib/ld-2.5.so 00c49000-00d83000 r-xp 00000000 fd:00 2687015 /lib/libc-2.5.so 00d83000-00d85000 r-xp 0013a000 fd:00 2687015 /lib/libc-2.5.so 00d85000-00d86000 rwxp 0013c000 fd:00 2687015 /lib/libc-2.5.so 00d86000-00d89000 rwxp 00d86000 00:00 0 05327000-05332000 r-xp 00000000 fd:00 2689041 /lib/libgcc_s-4.1.2-20070626.so.1 05332000-05333000 rwxp 0000a000 fd:00 2689041 /lib/libgcc_s-4.1.2-20070626.so.1 08048000-08090000 r-xp 00000000 fd:00 14979685 /usr/local/bin/htcobol 08090000-08095000 rw-p 00048000 fd:00 14979685 /usr/local/bin/htcobol 08095000-080b9000 rw-p 08095000 00:00 0 09bb2000-09bd3000 rw-p 09bb2000 00:00 0 b7d00000-b7d21000 rw-p b7d00000 00:00 0 b7d21000-b7e00000 ---p b7d21000 00:00 0 b7ed7000-b7ef9000 rw-p b7ed7000 00:00 0 b7ef9000-b7f08000 rw-p b7ef9000 00:00 0 bfb70000-bfb85000 rw-p bfb70000 00:00 0 [stack] Aborted [root@Appserver TinyCat]# -- View this message in context: http://www.nabble.com/Segmentation-Fault-tf4383688.html#a12975914 Sent from the tiny-cobol-users mailing list archive at Nabble.com. |
From: David E. <de...@us...> - 2007-10-02 00:23:09
|
Reg wrote: > Eventually loaded/installed dev htcobol, > compiled same program, got same segmentation > fault. > In desperation, juggled order of loading of > FD copybooks, got ABORT thru memory problem. > Any ideas? > ... > #htcobol -z -m -C -F -I . GCMMSTMN.COB > ... I think you may be using a more recent distribution. On my system, there is an intermittent bug which can be triggered by either, adding or removing, the print program listing command line option '-P'. I think it is somehow related to copybooks, found in the pre-processor. So in the above case, just add the '-P' option to the command line, and see if it removes the problem. htcobol -z -P -m -C -F -I . GCMMSTMN.COB Cheers. |
From: Reg <re...@ri...> - 2007-10-02 09:10:29
|
Hi David, Tried it, makes NO difference. After some experimentation with positioning of FD copy files, inescapable conclusion is :- There is a limit to the total size of FD s (i.e. the maximum memory for total record sizes). Can't get past it. Consequently, now expect limitation on size of code and possibly other things. Compiles (and runs) fine in Open Cobol. Regards, Reg. -- View this message in context: http://www.nabble.com/Segmentation-Fault-tf4383688.html#a12995381 Sent from the tiny-cobol-users mailing list archive at Nabble.com. |
From: David E. <de...@us...> - 2007-10-02 12:52:08
|
Reg, I think I may have found the problem (well, I hope). I don't know if you are familiar with C, but with some minor changes to 'compiler/pp_scanner.l', seems resolves the problem on my system. 1640: char *s, *s1, /* *tmp = NULL,*/ tmp[YY_READ_BUF_SIZE]; 1689:// tmp = malloc(YY_READ_BUF_SIZE); 1799:// if (tmp) {free(tmp); tmp=NULL;} So if you wish, try the above changes and see if it resolves the problem on your system. Cheers. |
From: Reg <re...@ri...> - 2007-10-02 15:19:19
|
Hi David, Made changes, got:- ******************************** [root@Appserver TinyCat]# htcobol -z -m -C -I . GCMMSTMN.COB Appending '.' to include (copybooks) search path GEC=> path: () base (GCMMSTMN) ext: (.COB) Pre-processing 'GCMMSTMN.COB' Output intermidiate file 'GCMMSTMN.i' searching directory path '.' found copybook name './BIGSA.CF' searching directory path '.' found copybook name './DATAPUT.SA' searching directory path '.' found copybook name './LANGFILE.SA' searching directory path '.' found copybook name './LANGTXT.SA' searching directory path '.' found copybook name './LANGLOG.SA' searching directory path '.' found copybook name './REPFILE.SA' searching directory path '.' found copybook name './VLSTOR.SA' searching directory path '.' found copybook name './TLSTOR.SA' searching directory path '.' found copybook name './PRTFILE.SA' searching directory path '.' found copybook name './SUPMAST.SA' searching directory path '.' found copybook name './INVCS.SA' searching directory path '.' found copybook name './SELFILE.SA' searching directory path '.' found copybook name './POUT.SA' searching directory path '.' found copybook name './PASWRD.SA' searching directory path '.' found copybook name './CURRFILE.SA' searching directory path '.' found copybook name './CURRRATE.SA' searching directory path '.' found copybook name './VATFILE.SA' searching directory path '.' found copybook name './ACHART.SA' searching directory path '.' found copybook name './TRANS.SA' searching directory path '.' found copybook name './FIXCURR.SA' searching directory path '.' found copybook name './DESCS.SA' searching directory path '.' found copybook name './LNDESCS.SA' searching directory path '.' found copybook name './ICILOG.SA' searching directory path '.' found copybook name './ICICODE.SA' searching directory path '.' found copybook name './ICIUNIT.SA' searching directory path '.' found copybook name './ICIMCYCL.SA' searching directory path '.' found copybook name './ICIHOL.SA' searching directory path '.' found copybook name './BIGFD.CF' searching directory path '.' found copybook name './DATAPUT.FD' searching directory path '.' found copybook name './LANGFILE.FD' searching directory path '.' found copybook name './LANGTXT.FD' searching directory path '.' found copybook name './LANGLOG.FD' searching directory path '.' found copybook name './REPFILE.FD' searching directory path '.' found copybook name './VLSTOR.FD' searching directory path '.' found copybook name './TLSTOR.FD' searching directory path '.' found copybook name './PRTFILE.FD' searching directory path '.' found copybook name './CURRFILE.FD' searching directory path '.' found copybook name './CURRRATE.FD' searching directory path '.' found copybook name './VATFILE.FD' searching directory path '.' found copybook name './ACHART.FD' searching directory path '.' found copybook name './TRANS.FD' searching directory path '.' found copybook name './FIXCURR.FD' searching directory path '.' found copybook name './DESCS.FD' searching directory path '.' found copybook name './LNDESCS.FD' searching directory path '.' found copybook name './ICILOG.FD' *** glibc detected *** htcobol: malloc(): memory corruption: 0x091c9278 *** ======= Backtrace: ========= /lib/libc.so.6[0xcb013c] /lib/libc.so.6(__libc_malloc+0x7e)[0xcb12de] /lib/libc.so.6[0xc9f13f] /lib/libc.so.6(fopen+0x2c)[0xc9f20c] htcobol[0x805865f] htcobol[0x8056404] htcobol[0x805431e] htcobol[0x806f89e] htcobol[0x805903f] /lib/libc.so.6(__libc_start_main+0xdc)[0xc5edec] htcobol[0x8048f01] ======= Memory map: ======== 00110000-00111000 r-xp 00110000 00:00 0 [vdso] 00c2c000-00c45000 r-xp 00000000 fd:00 2687014 /lib/ld-2.5.so 00c45000-00c46000 r-xp 00019000 fd:00 2687014 /lib/ld-2.5.so 00c46000-00c47000 rwxp 0001a000 fd:00 2687014 /lib/ld-2.5.so 00c49000-00d83000 r-xp 00000000 fd:00 2687015 /lib/libc-2.5.so 00d83000-00d85000 r-xp 0013a000 fd:00 2687015 /lib/libc-2.5.so 00d85000-00d86000 rwxp 0013c000 fd:00 2687015 /lib/libc-2.5.so 00d86000-00d89000 rwxp 00d86000 00:00 0 05327000-05332000 r-xp 00000000 fd:00 2689041 /lib/libgcc_s-4.1.2-20070626.so.1 05332000-05333000 rwxp 0000a000 fd:00 2689041 /lib/libgcc_s-4.1.2-20070626.so.1 08048000-08090000 r-xp 00000000 fd:00 14979685 /usr/local/bin/htcobol 08090000-08095000 rw-p 00048000 fd:00 14979685 /usr/local/bin/htcobol 08095000-080b9000 rw-p 08095000 00:00 0 091bd000-091de000 rw-p 091bd000 00:00 0 b7e00000-b7e21000 rw-p b7e00000 00:00 0 b7e21000-b7f00000 ---p b7e21000 00:00 0 b7fcc000-b7fee000 rw-p b7fcc000 00:00 0 b7fee000-b7ffd000 rw-p b7fee000 00:00 0 bfd5f000-bfd75000 rw-p bfd5f000 00:00 0 [stack] Aborted [root@Appserver TinyCat]# ********************************* Seems to have moved problem somewhere else..... Regards, Reg. -- View this message in context: http://www.nabble.com/Segmentation-Fault-tf4383688.html#a13000899 Sent from the tiny-cobol-users mailing list archive at Nabble.com. |
From: Roger W. <si...@si...> - 2007-10-03 06:58:34
|
<snip> *** glibc detected *** htcobol: malloc(): memory corruption: 0x091c9278 *** ======= Backtrace: ========= /lib/libc.so.6[0xcb013c] </snip> Easiest way to find out what is going on is to install valgrind (http://valgrind.org) Grab the latest source, do the usual ./configure --prefix=/usr; make install Then simply prefix your compile command with "valgrind" - valgrind htcobol -z -m -C -I . GCMMSTMN.COB Note to David - I occasionally do this in OC for the OC test suite and the ANSI85 test suite (For compiles AND execution). Roger |
From: David E. <de...@us...> - 2007-10-08 01:03:50
|
Roger While wrote: > ... > Easiest way to find out what is going on is to install > valgrind (http://valgrind.org) > ... > Note to David - I occasionally do this in OC for > the OC test suite and the ANSI85 test suite > (For compiles AND execution). Thanks for the tip, Roger. I've used Valgrind on 'htcobol' and found a memory over-write due to an allocation size error. But other than that error, it is reporting memory errors on what appears to be valid code. |
From: Reg <re...@ri...> - 2007-10-09 08:05:16
|
Hi David, Maybe take a look at my message of September 6th.? Regards, Reg. -- View this message in context: http://www.nabble.com/Segmentation-Fault-tf4383688.html#a13111175 Sent from the tiny-cobol-users mailing list archive at Nabble.com. |
From: David E. <de...@us...> - 2007-10-13 02:26:07
|
Reg wrote: > Maybe take a look at my message of September 6th.? Not sure to what you are specifically reffering. Anyway, using Valgrind and with Roger's help, I uploaded some memory bug fixes. And hopefully, I did not introduce any new bugs to TC CVS (0.63.79). If the CVS version does not fix the problem you are encountering, then the only thing I can suggest is to post a Valgrind trace. Example: #valgrind --leak-check=full htcobol -c -P -I. GCMMSTMN.COB 2>&1 | GCMMSTMN.trace.txt Cheers |
From: Reg <re...@ri...> - 2007-10-13 11:20:54
|
Hi David, Just something I vaguely remember about more recent gcc returning a different OK response to older versions, but probably nothing to do with this problem..... Anyway, will try your new version and suggestion when I get some free time - eventually. Thanks for your efforts. Regards, Reg. David Essex-2 wrote: > > Reg wrote: > >> Maybe take a look at my message of September 6th.? > > Not sure to what you are specifically reffering. > > Anyway, using Valgrind and with Roger's help, I uploaded some memory bug > fixes. > And hopefully, I did not introduce any new bugs to TC CVS (0.63.79). > > If the CVS version does not fix the problem you are encountering, then > the only thing I can suggest is to post a Valgrind trace. > > Example: > #valgrind --leak-check=full htcobol -c -P -I. GCMMSTMN.COB 2>&1 | > GCMMSTMN.trace.txt > > Cheers > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Tin...@li... > https://lists.sourceforge.net/lists/listinfo/tiny-cobol-users > > -- View this message in context: http://www.nabble.com/Segmentation-Fault-tf4383688.html#a13188743 Sent from the tiny-cobol-users mailing list archive at Nabble.com. |