RocksDB library leaks private symbols
ottok opened this issue · comments
As one of the maintainers in Debian, I attempted to create a librocksdb9.3.symbols file for tracking ABI stability in RocksDB releases. The file draft begins:
librocksdb.so.9.3 librocksdb9.3 #MINVER#
* Build-Depends-Package: librocksdb-dev
ROCKSDB_XXH128@Base 9.3.1
ROCKSDB_XXH128_canonicalFromHash@Base 9.3.1
ROCKSDB_XXH128_cmp@Base 9.3.1
ROCKSDB_XXH128_hashFromCanonical@Base 9.3.1
ROCKSDB_XXH128_isEqual@Base 9.3.1
ROCKSDB_XXH32@Base 9.3.1
ROCKSDB_XXH32_canonicalFromHash@Base 9.3.1
ROCKSDB_XXH32_copyState@Base 9.3.1
ROCKSDB_XXH32_createState@Base 9.3.1
ROCKSDB_XXH32_digest@Base 9.3.1
ROCKSDB_XXH32_freeState@Base 9.3.1
ROCKSDB_XXH32_hashFromCanonical@Base 9.3.1
ROCKSDB_XXH32_reset@Base 9.3.1
ROCKSDB_XXH32_update@Base 9.3.1
ROCKSDB_XXH3_128bits@Base 9.3.1
ROCKSDB_XXH3_128bits_digest@Base 9.3.1
ROCKSDB_XXH3_128bits_reset@Base 9.3.1
Expected behavior
Only intentional symbols from the RocksDB API should be visible.
Actual behavior
Thousands of private symbols leak through when running dpkg-gensymbols.
From https://salsa.debian.org/otto/rocksdb/-/jobs/5963452:
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorISt10shared_ptrINS0_31TablePropertiesCollectorFactoryEEEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E_E10_M_managerERSt9_Any_dataRKSR_St18_Manager_operation@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorISt10shared_ptrINS0_31TablePropertiesCollectorFactoryEEEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E_E9_M_invokeERKSt9_Any_dataS3_SB_OSD_SU_OSE_@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorIiEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E1_E10_M_managerERSt9_Any_dataRKSO_St18_Manager_operation@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorIiEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E1_E9_M_invokeERKSt9_Any_dataS3_SB_OSD_SR_OSE_@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorIiEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E_E10_M_managerERSt9_Any_dataRKSO_St18_Manager_operation@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorIiEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E_E9_M_invokeERKSt9_Any_dataS3_SB_OSD_SR_OSE_@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorImEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E1_E10_M_managerERSt9_Any_dataRKSO_St18_Manager_operation@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorImEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E1_E9_M_invokeERKSt9_Any_dataS3_SB_OSD_SR_OSE_@Base 9.3.1-1+salsaci+20240713+4
+ _ZNSt17_Function_handlerIFbRKN7rocksdb13ConfigOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvSD_PS9_EZNS0_14OptionTypeInfo6VectorImEESG_iNS0_22OptionVerificationTypeENS0_15OptionTypeFlagsERKSG_cEUlS3_SB_SD_SD_SE_E_E10_M_managerERSt9_Any_dataRKSO_St18_Manager_operation@Base 9.3.1-1+salsaci+20240713+4