Date: Wed, 6 Dec 2000 23:51:53 +0600 (NS) From: Max Khon <fjoe@iclub.nsu.ru> To: stable@FreeBSD.ORG Cc: jdp@polstra.com, osa@freebsd.org.ru Subject: Re: Mysql segfaults; is the culprit libstdc++, pthread, regex ...? Message-ID: <Pine.BSF.4.21.0012062322520.53775-200000@iclub.nsu.ru> In-Reply-To: <20001206091452.C2367@dragon.nuxi.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
hi, there!
On Wed, 6 Dec 2000, David O'Brien wrote:
> > now I can confirm that on latest -stable without "linking shared objects
> > with libgcc_[r]_pic" changes ACE wrappers tests run correctly without
> > segfaults. test program ("bad" one) from PR/23252 also does not segfault
> > anymore.
>
> > sorry, no workaround so far except backing out that changes
> > (patch for testing attached) and have no time to find more correct
> > solution.
>
> Lets get the patch right for people to test. Remove all the bogus
> -kthread stuff. As that was only for Linux threads (or does ACE use
> that)?? If so, then it isn't being linked the way Jason Evans says it
> should.
ACE can use both linuxthreads or pthreads. we use it with pthreads. Sorry,
have no time to test patch without -kthread stuff (attached) or to find
out what is the deal with threads when we are linking shared libraries
against libgcc_[r_]pic.a.
> > I think that changes to compiler and binutils should be tested
> > in -current for much longer period of time before MFC and should be MFC'ed
> > long before release date.
>
> If you understood what was broken by not doing this commit, you'd
> understand why it was done. C++ exceptions (even w/o threads) was rather
> broken. W/o this patch we were going to dropped as a GCC 3.0 release
> test platform.
AFAIR C++ exceptions without this patch are not broken (I am running
latest -stable without them now). When we switched to gcc crtstuff the
only thing that was broken were C++ multithreaded programs because threads
were not initialized when crtstuff tried to use them to initialize eh
context information.
I think it does not matter why it was done -- we need
someone to find out why linking shared libraries against libgcc_[r_]pic.a
breaks multithreaded programs.
/fjoe
[-- Attachment #2 --]
--- gnu/usr.bin/cc/cc_tools/freebsd-native.h.orig Sun Nov 12 03:52:40 2000
+++ gnu/usr.bin/cc/cc_tools/freebsd-native.h Wed Dec 6 14:54:29 2000
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/gnu/usr.bin/cc/cc_tools/freebsd-native.h,v 1.5.2.1 2000/11/11 21:52:40 obrien Exp $ */
+/* $FreeBSD: src/gnu/usr.bin/cc/cc_tools/freebsd-native.h,v 1.4 1999/12/22 05:00:27 obrien Exp $ */
/* FREEBSD_NATIVE is defined when gcc is integrated into the FreeBSD
source tree so it can be configured appropriately without using
@@ -50,9 +50,4 @@
/* Tell gcc to locate libgcc.a for us according to the -m rules. */
#undef LIBGCC_SPEC
#define LIBGCC_SPEC \
- "%{!shared: \
- %{!pthread:libgcc.a%s} \
- %{pthread:libgcc_r.a%s}} \
- %{shared: \
- %{!pthread:libgcc_pic.a%s} \
- %{pthread:libgcc_r_pic.a%s}}"
+ "%{!shared:%{!pthread:libgcc.a%s}%{pthread:libgcc_r.a%s}}"
--- Makefile.inc1.orig Sat Dec 2 03:58:09 2000
+++ Makefile.inc1 Wed Dec 6 15:01:03 2000
@@ -682,7 +682,7 @@
#
# The following dependencies exist between the libraries:
#
-# lib*: csu libgcc_pic
+# lib*: csu
# libatm: libmd
# libcrypt: libmd
# libdialog: libncurses
@@ -690,7 +690,7 @@
# libg++: libm
# libkrb: libcrypt
# libopie: libmd
-# libpam: libcom_err libcrypt libcrypto libkrb libopie libradius \
+# libpam: libcom_err libcrypt libcrypto libgcc_pic libkrb libopie libradius \
# libskey libtacplus libutil libz libssh
# libradius: libmd
# libreadline: libncurses
@@ -703,7 +703,7 @@
#
# gnu/lib: lib/libm lib/libncurses
# kerberosIV/lib kerberos5/lib: lib/libcrypt
-# lib/libpam: secure/lib/libcrypto kerberosIV/lib/libkrb \
+# lib/libpam: secure/lib/libcrypto kerberosIV/lib/libkrb gnu/lib/libgcc \
# secure/lib/libssh lib/libz
# secure/lib: lib/libmd
#
@@ -742,9 +742,8 @@
.endif
libraries:
-.for _lib in ${_csu} gnu/lib/csu gnu/lib/libgcc lib/libmd lib/libcrypt \
- ${_secure_lib} ${_kerberosIV_lib} \
- ${_kerberos5_lib} lib/libcom_err ${_libm} lib/libncurses \
+.for _lib in ${_csu} gnu/lib/csu lib/libmd lib/libcrypt ${_secure_lib} ${_kerberosIV_lib} \
+ ${_kerberos5_lib} gnu/lib/libgcc lib/libcom_err ${_libm} lib/libncurses \
lib/libopie lib/libradius lib/libskey lib/libtacplus lib/libutil \
lib/libz lib gnu/lib \
${_libperl} usr.bin/lex/lib ${_libkeycap}
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0012062322520.53775-200000>
