public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Exception Handling is thread safe?
@ 1998-03-19 12:55 Bastiaan Bakker
  1998-03-22 11:46 ` Jeffrey A Law
  0 siblings, 1 reply; 6+ messages in thread
From: Bastiaan Bakker @ 1998-03-19 12:55 UTC (permalink / raw)
  To: egcs

Hi ,

On the OmniORB project pages I read  that egcs' exception handling is
not thread safe but that it can be fixed with a patch from Teemu Torma.
Now that egcs 1.02 is released I wonder whether this patch has been
incorporated. If not, how do I make egcs thread safe? Can I still apply
the same patch. Should I use g++ 2.8.1 for multi threading code instead,
or does it have the same problems?
Thanks in advance for any info on this subject,

Bastiaan Bakker

PS. Could the egcs project page maintainer please add a few lines about
this subject to the caveats page, I guess I'm not the only one
interested to know about egcs' thread safety.




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

* Re: Exception Handling is thread safe?
  1998-03-19 12:55 Exception Handling is thread safe? Bastiaan Bakker
@ 1998-03-22 11:46 ` Jeffrey A Law
  1998-03-23 10:41   ` erwin
  1998-03-23 16:39   ` Andi Kleen
  0 siblings, 2 replies; 6+ messages in thread
From: Jeffrey A Law @ 1998-03-22 11:46 UTC (permalink / raw)
  To: Bastiaan Bakker; +Cc: egcs

  In message < 3510EFB5.1F9DA6D@Harbinger.nl >you write:
  > On the OmniORB project pages I read  that egcs' exception handling is
  > not thread safe but that it can be fixed with a patch from Teemu Torma.
More correctly, the current releases are not MT thread safe; the
current development sources have thread safe exception handling.

  > Now that egcs 1.02 is released I wonder whether this patch has been
  > incorporated.
The MT safe EH code will not be integrated into the egcs-1.0.x releases;
it will appear in the egcs-1.1 release.

  > the same patch. Should I use g++ 2.8.1 for multi threading code instead,
  > or does it have the same problems?
gcc-2.8 has the same problems (and many more) in regards to exception
handling.  I do not recommend it.

  > PS. Could the egcs project page maintainer please add a few lines about
  > this subject to the caveats page, I guess I'm not the only one
  > interested to know about egcs' thread safety.
It's pretty rare that we get questions about this issue.

jeff

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

* Re: Exception Handling is thread safe?
  1998-03-22 11:46 ` Jeffrey A Law
@ 1998-03-23 10:41   ` erwin
  1998-03-23 16:39   ` Andi Kleen
  1 sibling, 0 replies; 6+ messages in thread
From: erwin @ 1998-03-23 10:41 UTC (permalink / raw)
  To: egcs

Jeffrey A Law wrote:

>   > PS. Could the egcs project page maintainer please add a few lines about
>   > this subject to the caveats page, I guess I'm not the only one
>   > interested to know about egcs' thread safety.
> It's pretty rare that we get questions about this issue.
> 
> jeff

Its not , I asked the same thing a while ago ;-P

Erwin

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

* Re: Exception Handling is thread safe?
  1998-03-22 11:46 ` Jeffrey A Law
  1998-03-23 10:41   ` erwin
@ 1998-03-23 16:39   ` Andi Kleen
  1 sibling, 0 replies; 6+ messages in thread
From: Andi Kleen @ 1998-03-23 16:39 UTC (permalink / raw)
  To: law; +Cc: Bastiaan Bakker, egcs, omniorb-list

Jeffrey A Law <law@cygnus.com> writes:

[cc'ed to the omniorb list]

>   In message < 3510EFB5.1F9DA6D@Harbinger.nl >you write:
>   > On the OmniORB project pages I read  that egcs' exception handling is
>   > not thread safe but that it can be fixed with a patch from Teemu Torma.
> More correctly, the current releases are not MT thread safe; the
> current development sources have thread safe exception handling.

This does not seem to work correctly. The OmniORB2 maintainer is especially
pointing people to use egcs-1.0.1+patch instead of egcs-current, because
the egcs-current exceptions break with OmniORB2. I don't know of any short
test case.

-Andi

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

* RE: Exception Handling is thread safe?
  1998-03-23 15:11 Kaz Kylheku
@ 1998-03-23 16:09 ` Joe Buck
  0 siblings, 0 replies; 6+ messages in thread
From: Joe Buck @ 1998-03-23 16:09 UTC (permalink / raw)
  To: Kaz Kylheku; +Cc: egcs

> Thread safe exception handling is available in the March 8th snapshot,
> which is what I am using right now. Presumably, it has been incorporated
> into the 1.0.2 release; I have not yet checked.

No, it hasn't (made it into 1.0.2).  Note that when releases change the
third digit, this is for critical bug fixes only, not new functionality,
so you should not expect that new stuff from snapshots gets into releases
until you see a change in the second number (release 1.1 or 1.1.0).

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

* RE: Exception Handling is thread safe?
@ 1998-03-23 15:11 Kaz Kylheku
  1998-03-23 16:09 ` Joe Buck
  0 siblings, 1 reply; 6+ messages in thread
From: Kaz Kylheku @ 1998-03-23 15:11 UTC (permalink / raw)
  To: 'Bastiaan Bakker', egcs

On Thursday, March 19, 1998 2:13 AM, Bastiaan Bakker 
[SMTP:Bastiaan.Bakker@Harbinger.nl] wrote:
> Hi ,
>
> On the OmniORB project pages I read  that egcs' exception handling is
> not thread safe but that it can be fixed with a patch from Teemu Torma.

Thread safe exception handling is available in the March 8th snapshot,
which is what I am using right now. Presumably, it has been incorporated
into the 1.0.2 release; I have not yet checked.

In the March 8th (980308) snapshot, you have to manually enable thread-safe
exception handling by editing the 'gthr.h' header file in the 'gcc' 
subdirectory.

At the top, add

	#define _PTHREADS = 1

if you are using POSIX threads. Otherwise #define _DCE_THREADS
or _SOLARIS_THREADS in the same way.

Then remove the 'libgcc2.a' file, and do a make install. Watch for
libgcc.a being built; if it doesn't happen, remove libgcc2.a and try
again.

Once you have everything successfully built and installed, your
libgcc.a now contains undefined symbols referring to the appropriate
threading library, thus you may have to add the appropriate link options
on the compiler command line to compile C++ code that does
exception handling. (On my system, the pthreads API is in
a separate library; I'm using LinuxThreads in conjunction with
libc5.)

This advice may work for 1.0.2; I don't know yet.

Watch out; I tried to ``cheat'' by doing only a ``make libgcc.a''
in the gcc directory and copying the libgcc.a file manually to
its destination. It did not work for some reason that I don't fully
understand. Only a ``make install'' did the right magic.


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

end of thread, other threads:[~1998-03-23 16:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-19 12:55 Exception Handling is thread safe? Bastiaan Bakker
1998-03-22 11:46 ` Jeffrey A Law
1998-03-23 10:41   ` erwin
1998-03-23 16:39   ` Andi Kleen
1998-03-23 15:11 Kaz Kylheku
1998-03-23 16:09 ` Joe Buck

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).