delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/02/22/04:36:24

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3A94DCDB.38FDDD20@studserv.uni-stuttgart.de>
Date: Thu, 22 Feb 2001 10:33:15 +0100
From: Tilman Utz <Tilman DOT Utz AT studserv DOT uni-stuttgart DOT de>
X-Mailer: Mozilla 4.7 [de] (Win98; I)
X-Accept-Language: de,en,fr
MIME-Version: 1.0
To: Mumit Khan <khan AT NanoTech DOT Wisc DOT EDU>
CC: Kevin Camera <kcamera AT bwrc DOT eecs DOT berkeley DOT edu>,
"'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: Re: GCC untrackable crashes
References: <Pine DOT HPP DOT 3 DOT 96 DOT 1010221181731 DOT 20219A-100000 AT hp2 DOT xraylith DOT wisc DOT edu>

Hi,
I read the thread with much interest, because I have a similar problem, a seg
fault within __size_of_stack_reserve. The following code:

  1 #include <fstream>
  2 #include <iostream>
  3 #include <string>
  4
  5 using namespace std;
  6
  7 int main()
- 8 {
  9      ofstream opstream("c:\\example.log");
  10      if(!opstream) {
  11      cerr << "File cannot be opened.\n";
  12
  13      return 1;
  14      }
  15      opstream << 3.1415;
  16      opstream << " " << 23 << '\n' << "Test stream.";
  17      opstream.close();
  18
  19      return 0;
  20 }

(I already posted this some days ago)compiled with and without mno-cygwin flag.
With cygwin target the compiled program runs without any problem. The mno-cygwin
version crashes somewhere between line 15 and 16:
15      opstream << 3.1415;
- 0x401304 <main+188>:  add    $0xfffffffc,%esp
- 0x401307 <main+191>:  fldl   0x401240
- 0x40130d <main+197>:  sub    $0x8,%esp
- 0x401310 <main+200>:  fstpl  (%esp,1)
- 0x401313 <main+203>:  lea    0xffffff80(%ebp),%eax
- 0x401316 <main+206>:  lea    0x50(%eax),%edx
- 0x401319 <main+209>:  push   %edx
- 0x40131a <main+210>:  call   0x403824 <__ls__7ostreamd>
- 0x40131f <main+215>:  add    $0x10,%esp
 16      opstream << " " << 23 << '\n' <<

more exactly: after the function call (<main+210>).
As I started using gdb two days ago, I'm pretty clueless, what all these numbers
and adresses want to tell me...
So, I'd be very grateful, if anyone could tell me if this is a known problem
(maybe any workaround?) and more generally, how to tackle such problems, handle
the gdb output... because I don't just want to delegate my problems, I'm always
willing to solve them for myself (...and I hope, the last one wasn't too OT for
this list)

Thanks Tilman


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019