Re: static member variable in libcommon and double free

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

 



On Wed, Jul 27, 2016 at 8:04 AM, kefu chai <tchaikov@xxxxxxxxx> wrote:
>> Ideally the shared libraries should not export any global variables.
>
> thanks Patrick, yeah. this would force us to do the right thing:
>
> * for cephfs
>  - pass `--exclude-libs=libcommon.a` to linker,
>  - find a way to implement libtools' "-export-symbols-regex
> '^ceph_.*'" with cmake
> * for librados
>  - pass `--exclude-libs=ALL` to linker,
> * for those naughty tests who use the internal symbols
>  - link them against the convenience libs (or objects) by which the
> symbols are offered.

Great job kefu on the fix: https://github.com/ceph/ceph/pull/10472

I'll quote my comment on that PR:

This makes a huge reduction in the exported symbols:

$ objdump -T librados.so > librados.so.2850b6f
...
$ wc -l lib*so*
   2082 libcephfs.so.2850b6f
  10744 libcephfs.so.2850b6f^
   2009 librados.so.2850b6f
  10401 librados.so.2850b6f^

And the final set of global symbols look about right to me. (There
could be more pruning done but it's probably not worth it.)

-- 
Patrick Donnelly
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux