Subject: Re: pkg/33932
To: None <,,,>
From: Sergey Svishchev <>
List: pkgsrc-bugs
Date: 07/09/2006 09:20:02
The following reply was made to PR pkg/33932; it has been noted by GNATS.

From: Sergey Svishchev <>
Subject: Re: pkg/33932
Date: Sun, 9 Jul 2006 13:15:46 +0400

 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 On Fri, Jul 07, 2006 at 01:10:02PM +0000, wrote:
 > On Thu, Jul 06, 2006 at 08:00:01PM +0000, wrote:
 > > The problem is, once the SSL subsystem has been initialized in
 > > Firefox/Thunderbird, the NSS libraries are dynamically loaded into the
 > > running image.  Later, when one chooses to print, libcups is also
 > > loaded.  Libcups brings with it OpenSSL.  Both OpenSSL and NSS share a
 > > SHA1_Update() symbol.  These symbols conflict in the running image of
 > > Firefox/Thunderbird.  What ends up happening is that the SHA1_Update
 > > from NSS gets called by CUPS instead of the SHA1_Update from OpenSSL.
 > > Thus, when SHA1_Final gets called from OpenSSL, bad things happen.
 > >=20
 > >
 > >=20
 > > Use -Bsymbolic when linking nss to avoid symbol conflicts with libraries
 > > that include OpenSSL (e.g. CUPS).  This may help alleviate the problem =
 > > Firefox crashing when trying to print when using CUPS.
 > I don't think this is a correct solution. Can you investigate whether
 > using RTLD_LOCAL for the dlopen calls of NSS and CUPS help?
 I'm not familiar with Mozilla code, but a quick grep revealed this:
 - CUPS ( is loaded by NS_LoadLibrary, which uses default
 flags (RTLD_NOW).
 - NSS is loaded by nsDll::Load, which uses RTLD_LAZY|RTLD_GLOBAL.
 As far as I understand, our dynamic linker default behaviour is
 equivalent to RTLD_LOCAL.  I couldn't find a way for nsDll::Load to use
 non-default flags while loading NSS.
 Sergey Svishchev
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 Comment: ''