Bug 205256 - Segmentation fault with mount_smbfs

Victor Sudakov vas at mpeks.tomsk.su
Thu Jan 28 02:46:47 UTC 2016

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
> 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
$ 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
$ 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 at sibptus.tomsk.ru

More information about the freebsd-questions mailing list