🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #49689

Bus Error on File Access

#49689
From: Paolo Baiardi
Date: Fri, 24 Dec 1993 15:04
43 lines
2439 bytes
First of all, Merry Christmas to all of you.

What happens:
	1) an ifstream and an ofstream are opened in main(), the ifstream
	is passed to various nested procedures for token analysis
	2) when the parsing is terminated, main calls another set of
	nested procedure for producing the output

gdb report:
Program received signal 10, Bus error
0x28aa4 in ios::rdbuf (this=0xf7fff908) at streambuf.h:489
streambuf.h:489: No such file or directory.

#0  0x28aa4 in ios::rdbuf (this=0xf7fff908) at streambuf.h:489
#1  0x26af8 in ostream::operator<< (this=0xf7fff904,
					 ^^^^^^^^^^ 
    s=0x47f0 "*** MODULE DESCRIPTION *** ") at iostream.cc:620
#2  0x4834 in datablock::produce_file_block (this=0x41510, fileout=@0xf7fff900)
								      ^^^^^^^^
    at /home/common/staff/kurgan/PROG/ARS2.0/SRC/DOC/reader.cc:782
#3  0x458c in treeblock::produce (this=0xf7fff9a8, fileout=@0xf7fffb40)
							      ^^^^^^^^
    at /home/common/staff/kurgan/PROG/ARS2.0/SRC/DOC/reader.cc:710
#4  0xeeb0 in main (argc=313736, argv=0x4cad0)
    at /home/common/staff/kurgan/PROG/ARS2.0/SRC/DOC/analyzer.cc:57

Please note that:
	a) the bus error point is NOT the same on various program runs, it
	depends on the size of the input file read ( on short files, the program
	works flawlessy ) with random changes
	b) I have compiled the source with gcc233,245,254, with 233 and 245 I
	had a bus error even on input ( the ifstream value was changed ), this
	does not happen with  gcc254 and libg++2.5

Could someone help me ?
( A Lot of ) Thanks in advance,
				
				Paolo

--
+-----------------------------------------------------------------------------+
| Paolo Baiardi			>kurgan@dist.dist.unige.it<		      |
+-----------------------------------------------------------------------------+
Technical Details
Message-ID: <2ff0eb$1e6@sgi.iunet.it>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!zib-berlin.de!netmbx.de!Germany.EU.net!EU.net!i2unix!news

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,128a99c2b396a4e7,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-12-24 09:37:51 PST
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!zib-berlin.de!netmbx.de!Germany.EU.net!EU.net!i2unix!news
From: kurgan@dist.dist.unige.it (Paolo Baiardi)
Newsgroups: gnu.gcc.help
Subject: Bus Error on File Access
Date: 24 Dec 1993 15:04:43 GMT
Organization: DIST - Universita' di Genova
Lines: 43
Message-ID: <2ff0eb$1e6@sgi.iunet.it>
NNTP-Posting-Host: dist.dist.unige.it
Keywords: gcc, ifstream, ofstream