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]

std::ofstream causes segfault in 1.5.x


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
   43 7295052 [main] cdrdao 1576 mmap64: addr 0, len 1065816064, prot 3, flags 22, fd -1, off 0
  646 7295698 [main] cdrdao 1576 seterrno_from_win_error: /netrel/src/cygwin-1.5.5-1/winsup/cygwin/mmap.cc:920 windows error 1455
   52 7295750 [main] cdrdao 1576 geterrno_from_win_error: unknown windows error 1455, setting errno to 13
   20 7295770 [main] cdrdao 1576 fhandler_disk_file::mmap: -1 = mmap(): CreateFileMapping failed with Win32 error 1455
   80 7295850 [main] cdrdao 1576 handle_exceptions: In cygwin_except_handler exc 0xC0000005 at 0x28FA6AE0 sp 0x22FA2C
   18 7295868 [main] cdrdao 1576 handle_exceptions: In cygwin_except_handler sig = 11 at 0x28FA6AE0
   18 7295886 [main] cdrdao 1576 handle_exceptions: In cygwin_except_handler calling 0x0
   18 7295904 [main] cdrdao 1576 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION


If further testing needs to be done i'm available.

Thanks,
Thomas


--
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]