From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 1 15:51:38 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D072106566B for ; Sun, 1 Feb 2009 15:51:38 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id BCE448FC12 for ; Sun, 1 Feb 2009 15:51:37 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so454230ywe.13 for ; Sun, 01 Feb 2009 07:51:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=uOLeV3OlJP9xNwI/H8W8D9+6l54B4FOcblDZFtHd+fk=; b=EtLyRfQI2DG14w3efmueoHyZUZlBRcVtF0IUwd52VhkThV5TTlCWlCOai4H/pLqinA NnjwC8deV1ZnC8EmUtIvAZyWKc+CGBMxHsf+4PAIwnYWy6tFgYuFd455K0y6EJLJdjiF i4aK2f7crS11fejGDVDoTAq0sXx2ltREXz0zc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=vwkaKdbd2LGl4MLEDAsPVRd+P+paIGsyPFdtP5iRE9Zgb4YVWgFv39UAeCd6S/mKIj tn+Y+ys84FTWuEylUaqQAISs7k8yApuSSLNVe9+rZ/bN+f16qO/S5wETibyvVdMl0Df1 Ty9PTT652E4OU8JFRdjdqW6LI5pdoeZAmG2iQ= MIME-Version: 1.0 Received: by 10.150.143.12 with SMTP id q12mr2464470ybd.81.1233502261942; Sun, 01 Feb 2009 07:31:01 -0800 (PST) Date: Sun, 1 Feb 2009 10:31:01 -0500 Message-ID: From: Ryan Stone To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: xorquewasp@googlemail.com Subject: gcc 4.3.2 libgcc_s.so exception handling broken? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2009 15:51:38 -0000 I saw a very similar thing happen when we moved to gcc 4.3 on a 6.1 system. The problem ended up being that we were linking everything, including shared objects, against a static libgcc. This meant that when a C++ program loaded a C++ shared object, there'd be two copies of the exception handling code in the process. What happened was the the executable registered all its exception handlers with the copy in the excecutable, and then loaded the shared object. When it raised an exception, it called the exception handling code in the shared object, which didn't know anything about the exception handlers in the executable, so it couldn't find them, so it called terminate(). The solution was to link everything against a dynamic libgcc, so there'd only be one copy of the exception handling code. Your problem may be similar. I doubt that you're statically linking libgcc in, but if you are, that's you're problem. My guess is that either your executable, or another shared library that your exectuable uses, is linking against a different libgcc_s.so, which would cause the same problem(multiple copies of the exception handling code). ldd should be able to tell you if this is the case. Ryan Stone