This is the mail archive of the
mailing list for the pthreas-win32 project.
RE: Application Programming errors hidden by pthreads library
- To: pthreads-win32 at sourceware dot cygnus dot com
- Subject: RE: Application Programming errors hidden by pthreads library
- From: reentrant <reentrant at yahoo dot com>
- Date: Mon, 31 Jan 2000 18:32:23 -0800 (PST)
Ok I took a peek through the most recent source of private.c (haven't been
able to test the latest cvs update yet) and it looks improved for MSVC, but
unchanged when compiled by compilers other than MSVC.
For the behavior to be equivalent when compiled with MSVC and non-MSVC
compilers the _pthread_catch(...) blocks need to be removed entirely.
Otherwise, still when compiled with non-MSVC compilers uncaught exceptions
(an application programming error) thrown by non-pthread library code will be
hidden - silently causing the the thread to exit which still does not adhere
to the C++ standard. The uncaught exception should be left uncaught and just
let what happens to uncaught exceptions happen and make the application
programmer correct their code or do their own catch( ... ) :).
I don't know if access violations are generated as exceptions under non-MSVC
compilers on Windows, if so, then hidden access violations still are a
problem too when compiled with a non-MSVC compiler.
It appears to be at least 50% better though :P.
--- Erik Hensema <email@example.com> wrote:
> > -----Original Message-----
> > From: reentrant [mailto:firstname.lastname@example.org]
> > Sent: Sunday, January 30, 2000 5:59 PM
> > To: email@example.com
> > Subject: Application Programming errors hidden by pthreads library
> > I've run into an oddity in the pthread library. After many
> > hours debugging
> > extremely mysterious behavior of my application I discovered
> > that the pthread
> > library catches all exceptions that a thread entry point
> > function could throw
> > (which on NT also includes Access Violations and such).
> Since the latest snapshot something has changed in the exception handling.
> I'm not really sure what exactly happened since I'm using a private version
> of pthreads-win32 (my modifications are submitted and in CVS), but you
> should definitely try the latest snapshot.
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.