public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Exceptions and thread safety
@ 2000-03-22  8:13 Anjul Srivastava
  2000-03-22 14:58 ` Alexandre Oliva
  2000-03-22 15:04 ` Martin v. Loewis
  0 siblings, 2 replies; 4+ messages in thread
From: Anjul Srivastava @ 2000-03-22  8:13 UTC (permalink / raw)
  To: 'gcc@gcc.gnu.org'

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 660 bytes --]

I am told that 
exception handling in gcc is not thread safe. I am not sure what this precisely 
means, but I would imagine that if you have two threads and both enter exception 
handling code, then something nasty will happen.
 
1.    
Could somebody more knowledgeable please characterise this problem (if it 
exists) more precisely.
2.    
I would like to work on a solution to this problem. Since this would be my first 
foray into gcc, I would really appreciate any mentoring as to how to go about 
fixing the problem. (I have a reasonable knowledge of compiler design & 
techniques, C/C++ programming, and Unix threads).
 
Anjul.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Exceptions and thread safety
  2000-03-22  8:13 Exceptions and thread safety Anjul Srivastava
@ 2000-03-22 14:58 ` Alexandre Oliva
  2000-03-22 15:04 ` Martin v. Loewis
  1 sibling, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2000-03-22 14:58 UTC (permalink / raw)
  To: Anjul Srivastava; +Cc: 'gcc@gcc.gnu.org'

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 877 bytes --]

On Mar 22, 2000, Anjul Srivastava <anjul.srivastava@sanchez.com> wrote:

> I am told that exception handling in gcc is not thread safe.

It is, as long as GCC is configured/built with --enable-threads, on
targets that support it.  Search for `enable_threads' in
gcc/configure.in for the complete list of all platforms in which GCC
supports thread-safe exception handling.

> I am not sure what this precisely means, but I would imagine that if
> you have two threads and both enter exception handling code, then
> something nasty will happen.
 
I think that's a reasonable definition.

-- 
Alexandre Oliva    Enjoy Guaraná, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Exceptions and thread safety
  2000-03-22  8:13 Exceptions and thread safety Anjul Srivastava
  2000-03-22 14:58 ` Alexandre Oliva
@ 2000-03-22 15:04 ` Martin v. Loewis
  1 sibling, 0 replies; 4+ messages in thread
From: Martin v. Loewis @ 2000-03-22 15:04 UTC (permalink / raw)
  To: anjul.srivastava; +Cc: gcc

> I am told that exception handling in gcc is not thread safe. I am
> not sure what this precisely means, but I would imagine that if you
> have two threads and both enter exception handling code, then
> something nasty will happen.

That information is incorrect. The problem existed in gcc 2.8, but is
corrected in gcc 2.95.

Regards,
Martin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Exceptions and thread safety
@ 2000-03-22 16:49 Mike Stump
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Stump @ 2000-03-22 16:49 UTC (permalink / raw)
  To: anjul.srivastava, gcc

> From: Anjul Srivastava <anjul.srivastava@sanchez.com>
> To: "'gcc@gcc.gnu.org'" <gcc@gcc.gnu.org>
> Date: Wed, 22 Mar 2000 11:12:04 -0500

> 2.    I would like to work on a solution to this problem. Since this would
> be my first foray into gcc, I would really appreciate any mentoring as to
> how to go about fixing the problem. (I have a reasonable knowledge of
> compiler design & techniques, C/C++ programming, and Unix threads).

We'd love to have you work on whatever you can...  There is support
for thread safe EH on most targets already.  You should check to see
if the targets you are interested support it, and if they don't you
can add support for them.  See configure* and gthr* files for details.

If they all support it, you can always find some other problems to
work on, there are an unlimited number to choose from.  :-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-03-22 16:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-22  8:13 Exceptions and thread safety Anjul Srivastava
2000-03-22 14:58 ` Alexandre Oliva
2000-03-22 15:04 ` Martin v. Loewis
2000-03-22 16:49 Mike Stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).