]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
buffer: make buffer::exception classes undefined in dynamic objects
authorYan, Zheng <zyan@redhat.com>
Wed, 29 Jul 2015 09:44:52 +0000 (17:44 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 31 Aug 2015 08:00:26 +0000 (16:00 +0800)
commitb82ed61220ef11fd547c8297e59212e5fc84bf37
tree5ff285b5b25ad8f16252f44690163a5ad9d60f8a
parentc57ef8c3ed5d8c2ed0a81edb740613ad93e972ab
buffer: make buffer::exception classes undefined in dynamic objects

On OSX, if the an exception class is declared and defined in header file,
but it ends up being compiled as private symbols in different binaries.
The exception handling code will take the two compiled exception classes
as different types! In our case, the one in libcls_xxx.so and the one is
ceph-osd are considered as different classes, thus the try-catch statement
fails to work.

The fix is force buffer::exception classes undefined in libcls_xxx.so. The
ibcls_xxx.so are compiled with '-undefined dynamic_lookup' option. when
it is loaded into ceph-osd, buffer::exception classes in ceph-osd will be
used.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/common/buffer.cc
src/include/buffer.h