Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Sun, 12 Oct 2003 10:34:02 +0200 From: Corinna Vinschen To: Cygwin AT cygwin DOT com Subject: Re: std::ofstream causes segfault in 1.5.x Message-ID: <20031012083402.GB10908@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: Cygwin AT cygwin DOT com References: <9525451343 DOT 20031010223436 AT huno DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9525451343.20031010223436@huno.net> User-Agent: Mutt/1.4.1i On Fri, Oct 10, 2003 at 10:34:36PM +0200, thomas wrote: > Hi, > > here is a simplified snippet from code that worked perfectly in a 1.3.x > environment, but doesn't work with 1.5.5 (i tried >1.5.2). > > ****************************************** > std::ofstream out("foo.toc"); > toc->print(out); // <- segfault here > > ... > > void Toc::print(std::ostream &out) const > { > out << "CD_ROM"; > } > ****************************************** > > Strace shows the following: > > 20 7293891 [main] cdrdao 1576 fstat64: 0 = fstat (3, 0x22F9E4) > 28 7293919 [main] cdrdao 1576 mmap64: addr 0, len 1065811968, prot 3, flags 22, fd -1, off 0 > 982 7294901 [main] cdrdao 1576 seterrno_from_win_error: /netrel/src/cygwin-1.5.5-1/winsup/cygwin/mmap.cc:920 windows error 1455 > 85 7294986 [main] cdrdao 1576 geterrno_from_win_error: unknown windows error 1455, setting errno to 13 > 23 7295009 [main] cdrdao 1576 fhandler_disk_file::mmap: -1 = mmap(): CreateFileMapping failed with Win32 error 1455 net helpmsg 1455 The paging file is too small for this operation to complete. Can you tell me why the process tries to mmap 1065811968 bytes == ~1Gig? That won't work, nor would it under 1.3.22 on the same machine. The cause for this is outside of the strace and very likely outside of mmap itself. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/