Date: Tue, 8 Jun 1999 16:50:22 +0100 From: Josef Karthauser <joe@pavilion.net> To: Thomas David Rivers <rivers@dignus.com> Cc: hackers@FreeBSD.ORG Subject: Re: Wierd behavour from G++28! Message-ID: <19990608165022.B64790@pavilion.net> In-Reply-To: <199906081445.KAA07034@lakes.dignus.com>; from Thomas David Rivers on Tue, Jun 08, 1999 at 10:45:39AM -0400 References: <19990608152953.L14211@pavilion.net> <199906081445.KAA07034@lakes.dignus.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 08, 1999 at 10:45:39AM -0400, Thomas David Rivers wrote: > > (gdb) bt > > #0 0x8052c0f in ostream::flush () at /usr/include/ctype.h:149 > > #1 0x8052912 in ostream::operator<< () at /usr/include/ctype.h:149 > > #2 0x804995f in main (argc=1, argv=0xbfbfdb54) at search.c:219 > > (gdb) l > > > Or - it could be that the stream wasn't properly opened and no-one > checked for it... > > Look at line 219 in search.c, it should be a <<-operator operating > on a stream of some kind. Then, find where that stream is > declared/constructed and ensure everything is all right... 216 file_vector<char> the_index( index_file_name ); 217 if ( !the_index ) { 218 cerr << me << ": could not read index from " 219 << index_file_name << endl; 220 ::exit( 2 ); 221 } (gdb) break 218 Breakpoint 1 at 0x8049941: file search.c, line 218. (gdb) run Starting program: /data/home/joe/src/swish/swish++-2.0/search Breakpoint 1, main (argc=1, argv=0xbfbfdb14) at search.c:219 219 << index_file_name << endl; (gdb) print index_file_name $1 = 0x806bfe2 "the.index" (gdb) print me $2 = 0xbfbfdc35 "search" (gdb) print cerr $3 = 134671820 (gdb) print endl $4 = {<text variable, no debug info>} 0x8052d20 <endl(ostream &)> (gdb) s 0x80528ed in ostream::operator<< () at /usr/include/ctype.h:149 149 } (gdb) s Program received signal SIGSEGV, Segmentation fault. 0x8052c0f in ostream::flush () at /usr/include/ctype.h:149 149 } Is it because the program's compiled using the wrong includes? (/usr/include/ctype.h && /usr/local/bin/g++28) Joe -- Josef Karthauser FreeBSD: How many times have you booted today? Technical Manager Viagra for your server (http://www.uk.freebsd.org) Pavilion Internet plc. [joe@pavilion.net, joe@uk.freebsd.org, joe@tao.org.uk] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990608165022.B64790>