From owner-freebsd-hackers Fri Aug 25 1:15:37 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from iclub.nsu.ru (iclub.nsu.ru [193.124.222.66]) by hub.freebsd.org (Postfix) with ESMTP id 6A40937B424 for ; Fri, 25 Aug 2000 01:15:25 -0700 (PDT) Received: from localhost (fjoe@localhost) by iclub.nsu.ru (8.9.3/8.9.3) with ESMTP id PAA92576; Fri, 25 Aug 2000 15:10:46 +0700 (NSS) (envelope-from fjoe@iclub.nsu.ru) Date: Fri, 25 Aug 2000 15:10:46 +0700 (NSS) From: Max Khon To: "Bryan K. Ogawa" Cc: hackers@FreeBSD.ORG Subject: Re: Document about threads In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi, there! On Fri, 25 Aug 2000, Bryan K. Ogawa wrote: > 1. I had seen an email in the mailing list archives which asserted that > C++ exceptions have been broken since August 1999 in the multithread case > -- does anyone know what the status in 4.1-STABLE and -CURRENT are? I've > managed to get the code to compile under FreeBSD, but it crashes quite > rapidly after this, and I'm wondering if it's because of an exception > being thrown. This is under 4.1-RELEASE. this issue is unrelated to threads. FreeBSD stock g++ 2.95.2 compiler uses -fsjlj-exceptions mechanism for exception handling which is broken (g++ sometimes generates incorrect code even without any optimization options given). It is not FreeBSD-specific behaviour. gcc GNATS has bug report with similar gcc behaviour under OS/390. uou can still use /usr/ports/lang/egcs -- this is the same 2.95.2 but it uses DWARF2 unwinding info for exception handling -- the same mechanism that is used by default under Linux and (IIRC) Solaris. I believe that FreeBSD g++ will switch to this scheme in near future. I have initial set of patches that adds support to FreeBSD CRT startups for loading info from .eh_frame ELF sections needed for DWARF2 unwinding info mechanism to work. David O'Brien has all the information. I think he can shed some light on this issue (he is gcc/binutils maintainer) but he seems to be busy with other tasks -- I still haven't got any replies from him except "go ahead, it would be nice to have this feature" :) > 2. Sometimes, the programs crash at startup, but not always. I seem to > recall a recent discussion about the loader not being multi-thread safe -- > was this fixed in time for 4.1-RELEASE ? yes, I beleive /fjoe PS you will also have problems with shared libraries debugging (see PR/20373). I have solution for this problem too. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message