Bill Allombert on Wed, 30 Sep 2015 22:15:58 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: concat() symbol collision


On Tue, Sep 29, 2015 at 12:07:39PM +0200, Jeroen Demeyer wrote:
> Hello pari devs,
> 
> libPARI exports the function concat(). This is a dangerous name,
> since other libraries might also use this function name. William
> Stein reported a segfault in Sage which could be traced back to
> this:
> 
> ...
> /projects/sage/sage-6.9/local/lib/libpari-gmp-2.8.so.0(gcopy+0x2a0)[0x7f5092d3cb30]
> /projects/sage/sage-6.9/local/lib/libpari-gmp-2.8.so.0(concat+0x830)[0x7f5092b00680]
> /usr/lib/libkpathsea.so.6(kpathsea_selfdir+0x2af)[0x7f504b6d0c2f]
> /usr/lib/libkpathsea.so.6(kpathsea_set_program_name+0x6b)[0x7f504b6d0d1b]
> ...
> 
> It turns out that libkpathsea.so also exports a function called concat().
> 
> So I think we should rename concat -> pari_concat (or some other
> name). If you worry about backwards compatibility, you can always

Thanks for telling us about this!
I renamed concat to gconcat and concat1 to gconcat1.

Cheers,
Bill.