This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: std::ofstream causes segfault in 1.5.x


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@cygwin.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]