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

Bug#4011: simple c++ program segfaults



Package: gcc
Version: 2.7.2-8

A recent posting on comp.os.linux.apps by
dirka@uni-paderborn.de (Dirk Alboth) can
be reproduced on my Debian system.  In fact,
it seems to occur on a Sun with g++ too.

Here's a modified version of the program:

--
#include <fstream.h>

void main( int argc, char **argv) {
  ofstream ofst;
  ofst.ofstream( argv[1]);
  ofst.form( "%s\n", "Hello world");
  ofst.~ofstream();
}
--

Running it with the argument of 'test' produces
a segfault.

-- 
Debian GNU/Linux 1.1 is out! { http://www.debian.org/ }
A.  B <=> True			B.  A <=> False
Email:  Herbert Xu ~{PmV>HI~} <herbert@greathan.apana.org.au>
PGP Key:  pgp-public-keys@pgp.mit.edu or any other key sites



Reply to: