From owner-freebsd-questions@freebsd.org Thu Jan 28 02:46:47 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF25EA704D5 for ; Thu, 28 Jan 2016 02:46:47 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) Received: from relay2.tomsk.ru (mail.sibptus.tomsk.ru [212.73.124.5]) by mx1.freebsd.org (Postfix) with ESMTP id 3AB201825 for ; Thu, 28 Jan 2016 02:46:46 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) X-Virus-Scanned: by clamd daemon 0.98.5_1 for FreeBSD at relay2.tomsk.ru Received: from admin.sibptus.TOMSK.ru ([212.73.125.240] verified) by relay2.tomsk.ru (CommuniGate Pro SMTP 5.1.16) with ESMTPS id 39080315; Thu, 28 Jan 2016 08:46:43 +0600 Received: from admin.sibptus.TOMSK.ru (sudakov@localhost [127.0.0.1]) by admin.sibptus.TOMSK.ru (8.14.9/8.14.7) with ESMTP id u0S2kfHb078960; Thu, 28 Jan 2016 08:46:43 +0600 (NOVT) (envelope-from vas@mpeks.tomsk.su) Received: (from sudakov@localhost) by admin.sibptus.TOMSK.ru (8.14.9/8.14.7/Submit) id u0S2kfBm078959; Thu, 28 Jan 2016 08:46:41 +0600 (NOVT) (envelope-from vas@mpeks.tomsk.su) X-Authentication-Warning: admin.sibptus.TOMSK.ru: sudakov set sender to vas@mpeks.tomsk.su using -f Date: Thu, 28 Jan 2016 08:46:41 +0600 From: Victor Sudakov To: David Demelier Cc: freebsd-questions@freebsd.org Subject: Re: Bug 205256 - Segmentation fault with mount_smbfs Message-ID: <20160128024641.GA64567@admin.sibptus.tomsk.ru> References: <20160126055046.GA23116@admin.sibptus.tomsk.ru> <20160126123833.GA36004@admin.sibptus.tomsk.ru> <56A79D47.4060703@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56A79D47.4060703@gmail.com> Organization: OAO "Svyaztransneft", SibPTUS X-PGP-Key: http://www.dreamwidth.org/pubkey?user=victor_sudakov X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2016 02:46:47 -0000 David Demelier wrote: > > What I fail to understand is how converters/libiconv from the ports > > collection should influence mount_smbfs from the base system. But it > > does. > > It does because mount_smbfs dynamically load symbols by using > dlopen("libiconv.so") which then search into several paths and that also > includes /usr/local/lib/* It does because mount_smbfs calls libkiconv.so.4, and libkiconv calls dlopen("libiconv.so") in lib/libkiconv/xlat16_iconv.c (look in my_iconv_init(void)) > > I wonder what's wrong with libiconv-1.14_9 because it should be a minor > update with no API breakage. libkiconv calls dlsym(iconv_lib, "iconv_open"), but libiconv-1.14_9 does not contain "iconv_open" any more, it contains "libiconv_open" only. Please compare: $ pkg info -x libic libiconv-1.14_9 $ objdump -x /usr/local/lib/libiconv.so | grep _open 000184d0 l F .text 00000780 .hidden iconv_open 000184d0 g F .text 00000780 libiconv_open 00017d70 g F .text 0000075d libiconv_open_into $ $ pkg info -x libic libiconv-1.14_8 $ objdump -x /usr/local/lib/libiconv.so | grep _open 00018560 g F .text 00000780 iconv_open 00018560 g F .text 00000780 libiconv_open 00017e00 g F .text 0000075d libiconv_open_into $ -- Victor Sudakov, VAS4-RIPE, VAS47-RIPN sip:sudakov@sibptus.tomsk.ru