]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.in: add $CEPH_PRELOAD_LIBCXX to LD_PRELOAD if specified 41498/head
authorKefu Chai <kchai@redhat.com>
Mon, 24 May 2021 09:45:53 +0000 (17:45 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 24 May 2021 09:52:09 +0000 (17:52 +0800)
so use can start the vstart cluster like:

CEPH_PRELOAD_LIBCXX=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 MDS=0 MGR=1 OSD=3 MON=1 ../src/vstart.sh -n -x

as a workaround of https://github.com/google/sanitizers/issues/934

Fixes: https://tracker.ceph.com/issues/50948
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/ceph.in

index d561849e7b3bec4aac75565fca0eebc2e549a497..85e3760fe5dbaa48b24b95d42cdf66530c00fc1c 100755 (executable)
@@ -83,6 +83,9 @@ def respawn_in_path(lib_path, pybind_path, pythonlib_path, asan_lib_path):
         lib_path_var = "LD_LIBRARY_PATH"
 
     ld_paths_changed = 0
+    preload_libcxx = os.environ.get('CEPH_PRELOAD_LIBCXX')
+    if preload_libcxx:
+        ld_paths_changed += add_to_ld_path('LD_PRELOAD', preload_libcxx)
     if asan_lib_path:
         ld_paths_changed += add_to_ld_path('LD_PRELOAD', asan_lib_path)
     ld_paths_changed += add_to_ld_path(lib_path_var, lib_path)