From owner-freebsd-stable@FreeBSD.ORG Tue Jul 31 12:31:18 2007 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C85B16A418 for ; Tue, 31 Jul 2007 12:31:18 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.250]) by mx1.freebsd.org (Postfix) with ESMTP id C2D7813C459 for ; Tue, 31 Jul 2007 12:31:17 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so438168anc for ; Tue, 31 Jul 2007 05:31:17 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:date:from:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; b=rusLc0UFX9UXLnnjObSMxdpYI+MjOIrpOMiIVxuxKDKx97xgtQiKkiuEOGkX0qk5SaP5ykyj2f+IUjxl99P9nlWA0voK4HEuFTG/kc6KxXcjNR8h3jb5zPmBKmGsDqFk4pPwXqt+c4GyTRLHD1JsxCkAUuj3rx7BMD2fQgDq9NM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; b=tFNNkCY0ty3K9au/RkP5fejtCDA2u5Z0Swhb5ElDCDsf9PNSky+UslAOyrt6WQ2S6iVfmtvcRwRDL53sY+KYi5FBHUQiKzUyq0MKPcBFcuXtoRIn7KH+BlwKwlZBlFppN86V9/u3MMA3Zxnov9C6zfYKAMg261t/wCpDO2go2N4= Received: by 10.100.11.7 with SMTP id 7mr5187996ank.1185883520454; Tue, 31 Jul 2007 05:05:20 -0700 (PDT) Received: from kan.dnsalias.net ( [24.218.183.247]) by mx.google.com with ESMTPS id c16sm3811730anc.2007.07.31.05.05.05 (version=SSLv3 cipher=OTHER); Tue, 31 Jul 2007 05:05:06 -0700 (PDT) Date: Tue, 31 Jul 2007 08:05:01 -0400 From: Alexander Kabaev Message-ID: <20070731080501.65616627@kan.dnsalias.net> In-Reply-To: <200707292331.10845@aldan> References: <200707292331.10845@aldan> X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.12; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_YDkkS+HjyfdmMhxBIzTk_Kf; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: ports@FreeBSD.org, stable@FreeBSD.org Subject: Re: ImageMagick's "modules" and __cxa_finalize X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2007 12:31:18 -0000 --Sig_YDkkS+HjyfdmMhxBIzTk_Kf Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sun, 29 Jul 2007 23:31:10 -0400 Mikhail Teterin wrote: > Has anyone had any luck using ImageMagick built with modules support? >=20 > If I try that, and follow-up with `gmake check' (in the ${WRKSRC}), > about a fifth of ImageMagick's own self-tests seg-fault -- all of > them inside __cxa_finalize (after main() has already returned): >=20 > mi@aldan:ImageMagick/work/ImageMagick-6.3.5 (1023) gdb > tests/.libs/rwblob tests/rwblob.core [...] > (gdb) where 5 > #0 0x0000000804008cc0 in ?? () > #1 0x00000008020079e2 in __cxa_finalize () > from /lib/libc.so.6 #2 0x0000000802007637 in exit () > from /lib/libc.so.6 #3 0x0000000000401135 in _start () > #4 0x000000080052a000 in ?? () > (More stack frames follow...) > (gdb) > mi@aldan:ImageMagick/work/ImageMagick-6.3.5 (1024) gdb > tests/.libs/rwfile tests/rwfile.core [...] > (gdb) where 5 > #0 0x0000000803f04cc0 in ?? () > #1 0x00000008020079e2 in __cxa_finalize () > from /lib/libc.so.6 #2 0x0000000802007637 in exit () > from /lib/libc.so.6 #3 0x0000000000401085 in _start () > #4 0x000000080052a000 in ?? () > (More stack frames follow...) > (gdb)=20 >=20 > Full build/test log can be seen here: >=20 > http://aldan.algebra.com/~mi/IM-6.3.5-3.failure.log >=20 > Building without modules (as is the port's default) allows all > self-tests to pass smoothly. >=20 > According to ImageMagick and GraphicsMagick developers, these crashes > are due to some "reckless" calls to atexit() from inside the modules > (or inside the modules-loaded graphics librarires). By the time the > program is exiting, the libraries with the atexit-loaded functions > may already be unloaded. >=20 > But I thought, FreeBSD had that case covered since 2003: >=20 > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D59552 >=20 > Can someone, please, comment? >=20 > -mi You thought wrong. Please read the PR again and try to understand what part it really does cover and what doesn't. The comment was given to you before and it is the right one: atexit() cannot be used safely from the shared library. That is the reason why __cxa_atexit was invented in the first place. -- Alexander Kabaev --Sig_YDkkS+HjyfdmMhxBIzTk_Kf Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGryVtQ6z1jMm+XZYRApCtAJ9edgBUSYN9wbdfeEbAb+rSZA7TQwCfVoh5 w/zAMR9ZCz4BglLIKMgH7xU= =KF31 -----END PGP SIGNATURE----- --Sig_YDkkS+HjyfdmMhxBIzTk_Kf--