From mboxrd@z Thu Jan 1 00:00:00 1970 From: reentrant To: pthreads-win32@sourceware.cygnus.com Subject: RE: Application Programming errors hidden by pthreads library Date: Mon, 31 Jan 2000 18:48:00 -0000 Message-id: <20000201023223.12890.qmail@web1403.mail.yahoo.com> X-SW-Source: 2000/msg00013.html 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. Thanks, Dave --- Erik Hensema wrote: > > -----Original Message----- > > From: reentrant [ mailto:reentrant@yahoo.com ] > > Sent: Sunday, January 30, 2000 5:59 PM > > To: pthreads-win32@sourceware.cygnus.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. http://im.yahoo.com