delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/10/13/13:50:40

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <20041013175031.37162.qmail@web60802.mail.yahoo.com>
Date: Wed, 13 Oct 2004 10:50:31 -0700 (PDT)
From: Peter Xiaochuan Huang <xchuang AT yahoo DOT com>
Subject: Re: gcc exception handling
To: cygwin AT cygwin DOT com
In-Reply-To: <20041013174611.70238.qmail@web60805.mail.yahoo.com>
MIME-Version: 1.0

Responses are below....


--- Peter Xiaochuan Huang <xchuang AT yahoo DOT com> wrote:

> > -----Original Message-----
> > From: cygwin-owner On Behalf Of Peter Xiaochuan
> Huang
> > Sent: 12 October 2004 17:59
> 
> > I don't know if this a known issue. But I
> encounter
> > this problem when using gcc 3.3.3 on cygwin. The
> code
> > similar to below core dumps me.
> > 
> >    try {
> >       obj->dothis();
> >    }
> >     catch ( myexception& e)
> >     {
> >         return true;
> >      }
> > 
> > It core dumps on the return statement in gdb. But
> when
> > I make a simplified test including only above
> code,
> > the core dump doesn't happen any more. My program
> that
> > gets core dumped links pthread and uses mutex.
> > Actually the return statement should invoke stack
> > unwinding that will do mutex locking and
> unlocking.
> > Though I don't know if that is related or not.
> 
>   Are you using the correct command line options to
> compile with exceptions?

    I tried -mthreads that didn't fix it. What is the
right compile flag?

> 
>   Are you doing the final link using g++ rather than
> gcc?

    Yes, I compiled and linked use g++


> 
>   Do all functions have the correct throw specifiers
> on their prototypes?

    None of my functions has any throw specifier,
which means throw possibly anything. Is that good
enough ?

>  
> > Anybody else has similar problem ? 
> 
>   Maybe the same problem: we never resolved it yet:
>
http://www.cygwin.com/ml/cygwin/2004-09/msg01380.html
> 
> 
>   Are there any shared libraries involved?
> 
> >Any suggestion?
> 
> 1)  Keep trying to come up with a simple testcase?
> 2)  Switch gdb into assembly code view and debug the
> problem by seeing what
> actual values are in registers, stack and memory and
> what actual machine
> code instructions are getting executed to cause the
> problem?

    I may have to try this if the compile flag you
give to me doesn't fix the problem

> 
>     cheers, 
>       DaveK
> -- 
> Can't think of a witty .sigline today....
> 
> 
> --
> 

Thanks a lot for your quick response, Dave.

-Peter




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

- Raw text -


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