Skip to content

Conversation

mordante
Copy link
Member

@mordante mordante commented Nov 1, 2023

The patch https://reviews.llvm.org/D156609 fails in the CI [1] due to linker issues of

std::__1::basic_stringbuf<char, std::__1::char_traits, std::__1::allocator >::seekpos(std::__1::fpos<__mbstate_t>, unsigned int)

This is the only virtual function in this class marked _LIBCPP_HIDE_FROM_ABI_VIRTUAL causing the function not to be instantiated in the dylib.

[1] https://buildkite.com/llvm-project/libcxx-ci/builds/31253#018b8227-8bdb-4f77-b578-f6ef9f14d7de

The patch https://reviews.llvm.org/D156609 fails in the CI [1] due to
linker issues of

std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::seekpos(std::__1::fpos<__mbstate_t>, unsigned int)

This is the only virtual function in this class marked
_LIBCPP_HIDE_FROM_ABI_VIRTUAL causing the function not to be
instantiated in the dylib.

[1] https://buildkite.com/llvm-project/libcxx-ci/builds/31253#018b8227-8bdb-4f77-b578-f6ef9f14d7de
@mordante mordante requested a review from a team as a code owner November 1, 2023 17:25
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Nov 1, 2023
@llvmbot
Copy link
Member

llvmbot commented Nov 1, 2023

@llvm/pr-subscribers-libcxx

Author: Mark de Wever (mordante)

Changes

The patch https://reviews.llvm.org/D156609 fails in the CI [1] due to linker issues of

std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::seekpos(std::__1::fpos<__mbstate_t>, unsigned int)

This is the only virtual function in this class marked _LIBCPP_HIDE_FROM_ABI_VIRTUAL causing the function not to be instantiated in the dylib.

[1] https://buildkite.com/llvm-project/libcxx-ci/builds/31253#018b8227-8bdb-4f77-b578-f6ef9f14d7de


Full diff: https://github.com/llvm/llvm-project/pull/70963.diff

2 Files Affected:

  • (modified) libcxx/include/sstream (+1-1)
  • (modified) libcxx/utils/ci/run-buildbot (+1)
diff --git a/libcxx/include/sstream b/libcxx/include/sstream
index 4fec465d5748009..45c58bff090b2d8 100644
--- a/libcxx/include/sstream
+++ b/libcxx/include/sstream
@@ -448,7 +448,7 @@ protected:
     int_type overflow (int_type __c = traits_type::eof()) override;
     pos_type seekoff(off_type __off, ios_base::seekdir __way,
                      ios_base::openmode __wch = ios_base::in | ios_base::out) override;
-    _LIBCPP_HIDE_FROM_ABI_VIRTUAL
+//    _LIBCPP_HIDE_FROM_ABI_VIRTUAL
     pos_type seekpos(pos_type __sp,
                      ios_base::openmode __wch = ios_base::in | ios_base::out) override {
         return seekoff(__sp, ios_base::beg, __wch);
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index ebb255243ba9c15..4ac018c6a6939d9 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -320,6 +320,7 @@ generic-gcc)
                    -DLIBCXXABI_ENABLE_WERROR=NO \
                    -DLIBUNWIND_ENABLE_WERROR=NO
     check-runtimes
+    check-abi-list
 ;;
 generic-gcc-cxx11)
     clean

@mordante
Copy link
Member Author

mordante commented Nov 1, 2023

With Clang it fails since the change adds one new symbol

Symbol added: _ZNSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE7seekposENS_4fposI11__mbstate_tEEj
--
    {'name': 
'_ZNSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE7seekposENS_4fposI11__mbstate_tEEj',
 'type': 'FUNC', 'is_defined': True}

With GCC is fails with more symbol changes

Symbol added: _ZdlPvmSt11align_val_t
    {'name': '_ZdlPvmSt11align_val_t', 'type': 'FUNC', 'is_defined': False}

Symbol added: __cxa_throw_bad_array_new_length
    {'name': '__cxa_throw_bad_array_new_length', 'type': 'FUNC', 'is_defined': False}

Symbol added: _ZdlPvm
    {'name': '_ZdlPvm', 'type': 'FUNC', 'is_defined': False}

Symbol added: _ZNSt3__119__DOUBLE_POW5_SPLITE
    {'name': '_ZNSt3__119__DOUBLE_POW5_SPLITE', 'size': 5216, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__114__POW10_OFFSETE
    {'name': '_ZNSt3__114__POW10_OFFSETE', 'size': 128, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__16__itoa10__pow10_32E
    {'name': '_ZNSt3__16__itoa10__pow10_32E', 'size': 40, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__117__append_n_digitsEjjPc
    {'name': '_ZNSt3__117__append_n_digitsEjjPc', 'type': 'FUNC', 'is_defined': True}

Symbol added: _ZNSt3__116__POW10_OFFSET_2E
    {'name': '_ZNSt3__116__POW10_OFFSET_2E', 'size': 138, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__114error_categoryC1Ev
    {'name': '_ZNSt3__114error_categoryC1Ev', 'type': 'FUNC', 'is_defined': True}

Symbol added: _ZNSt3__120__d2fixed_buffered_nEPcS0_dj
    {'name': '_ZNSt3__120__d2fixed_buffered_nEPcS0_dj', 'type': 'FUNC', 'is_defined': True}

Symbol added: _ZNSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE7seekposENS_4fposI11__mbstate_tEEj
    {'name': '_ZNSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE7seekposENS_4fposI11__mbstate_tEEj', 'type': 'FUNC', 'is_defined': True}

Symbol added: _ZNSt3__125_General_precision_tablesIdE17_Ordinary_X_tableE
    {'name': '_ZNSt3__125_General_precision_tablesIdE17_Ordinary_X_tableE', 'size': 2512, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__118__d2exp_buffered_nEPcS0_dj
    {'name': '_ZNSt3__118__d2exp_buffered_nEPcS0_dj', 'type': 'FUNC', 'is_defined': True}

Symbol added: _ZNSt3__16__itoa10__pow10_64E
    {'name': '_ZNSt3__16__itoa10__pow10_64E', 'size': 160, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZTVNSt3__120__time_get_c_storageIcEE
    {'name': '_ZTVNSt3__120__time_get_c_storageIcEE', 'size': 72, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__125_General_precision_tablesIdE16_Special_X_tableE
    {'name': '_ZNSt3__125_General_precision_tablesIdE16_Special_X_tableE', 'size': 1560, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__122__FLOAT_POW5_INV_SPLITE
    {'name': '_ZNSt3__122__FLOAT_POW5_INV_SPLITE', 'size': 248, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__123__DOUBLE_POW5_INV_SPLITE
    {'name': '_ZNSt3__123__DOUBLE_POW5_INV_SPLITE', 'size': 4672, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZTVNSt3__120__time_get_c_storageIwEE
    {'name': '_ZTVNSt3__120__time_get_c_storageIwEE', 'size': 72, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__125_General_precision_tablesIfE17_Ordinary_X_tableE
    {'name': '_ZNSt3__125_General_precision_tablesIfE17_Ordinary_X_tableE', 'size': 176, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__110build_nameERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES7_i
    {'name': '_ZNSt3__110build_nameERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES7_i', 'type': 'FUNC', 'is_defined': True}

Symbol added: _ZNSt3__125_General_precision_tablesIfE16_Special_X_tableE
    {'name': '_ZNSt3__125_General_precision_tablesIfE16_Special_X_tableE', 'size': 252, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__19DoIOSInitD1Ev
    {'name': '_ZNSt3__19DoIOSInitD1Ev', 'type': 'FUNC', 'is_defined': True}

Symbol added: _ZNSt3__118__FLOAT_POW5_SPLITE
    {'name': '_ZNSt3__118__FLOAT_POW5_SPLITE', 'size': 376, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__19DoIOSInitD2Ev
    {'name': '_ZNSt3__19DoIOSInitD2Ev', 'type': 'FUNC', 'is_defined': True}

Symbol added: _ZNSt3__120__append_nine_digitsEjPc
    {'name': '_ZNSt3__120__append_nine_digitsEjPc', 'type': 'FUNC', 'is_defined': True}

Symbol added: _ZNSt3__16__itoa16__digits_base_10E
    {'name': '_ZNSt3__16__itoa16__digits_base_10E', 'size': 200, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__19DoIOSInitC1Ev
    {'name': '_ZNSt3__19DoIOSInitC1Ev', 'type': 'FUNC', 'is_defined': True}

Symbol added: _ZNSt3__19DoIOSInitC2Ev
    {'name': '_ZNSt3__19DoIOSInitC2Ev', 'type': 'FUNC', 'is_defined': True}

Symbol added: _ZNSt3__16__itoa16_Charconv_digitsE
    {'name': '_ZNSt3__16__itoa16_Charconv_digitsE', 'size': 36, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__113__POW10_SPLITE
    {'name': '_ZNSt3__113__POW10_SPLITE', 'size': 29376, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__116__f2s_buffered_nEPcS0_fNS_12chars_formatE
    {'name': '_ZNSt3__116__f2s_buffered_nEPcS0_fNS_12chars_formatE', 'type': 'FUNC', 'is_defined': True}

Symbol added: _ZNSt3__115__POW10_SPLIT_2E
    {'name': '_ZNSt3__115__POW10_SPLIT_2E', 'size': 75192, 'type': 'OBJECT', 'is_defined': True}

Symbol added: _ZNSt3__116__d2s_buffered_nEPcS0_dNS_12chars_formatE
    {'name': '_ZNSt3__116__d2s_buffered_nEPcS0_dNS_12chars_formatE', 'type': 'FUNC', 'is_defined': True}

Symbol added: _ZNSt3__113__MIN_BLOCK_2E
    {'name': '_ZNSt3__113__MIN_BLOCK_2E', 'size': 69, 'type': 'OBJECT', 'is_defined': True}

SYMBOL REMOVED: _ZdlPvSt11align_val_t
    {'is_defined': False, 'name': '_ZdlPvSt11align_val_t', 'type': 'FUNC'}

SYMBOL REMOVED: _ZTCNSt3__110istrstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE
    {'is_defined': True, 'name': '_ZTCNSt3__110istrstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 80, 'type': 'OBJECT'}

SYMBOL REMOVED: _ZTCNSt3__110ostrstreamE0_NS_13basic_ostreamIcNS_11char_traitsIcEEEE
    {'is_defined': True, 'name': '_ZTCNSt3__110ostrstreamE0_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 80, 'type': 'OBJECT'}

SYMBOL REMOVED: _ZTCNSt3__114basic_ifstreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE
    {'is_defined': True, 'name': '_ZTCNSt3__114basic_ifstreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE', 'size': 80, 'type': 'OBJECT'}

SYMBOL REMOVED: _ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE
    {'is_defined': True, 'name': '_ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE0_NS_13basic_istreamIcS2_EE', 'size': 80, 'type': 'OBJECT'}

SYMBOL REMOVED: _ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE16_NS_13basic_ostreamIcS2_EE
    {'is_defined': True, 'name': '_ZTCNSt3__114basic_iostreamIcNS_11char_traitsIcEEEE16_NS_13basic_ostreamIcS2_EE', 'size': 80, 'type': 'OBJECT'}

SYMBOL REMOVED: _ZTCNSt3__114basic_ofstreamIcNS_11char_traitsIcEEEE0_NS_13basic_ostreamIcS2_EE
    {'is_defined': True, 'name': '_ZTCNSt3__114basic_ofstreamIcNS_11char_traitsIcEEEE0_NS_13basic_ostreamIcS2_EE', 'size': 80, 'type': 'OBJECT'}

SYMBOL REMOVED: _ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_13basic_istreamIcS2_EE
    {'is_defined': True, 'name': '_ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_13basic_istreamIcS2_EE', 'size': 80, 'type': 'OBJECT'}

SYMBOL REMOVED: _ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_14basic_iostreamIcS2_EE
    {'is_defined': True, 'name': '_ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_14basic_iostreamIcS2_EE', 'size': 120, 'type': 'OBJECT'}

SYMBOL REMOVED: _ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE16_NS_13basic_ostreamIcS2_EE
    {'is_defined': True, 'name': '_ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE16_NS_13basic_ostreamIcS2_EE', 'size': 80, 'type': 'OBJECT'}

SYMBOL REMOVED: _ZTCNSt3__119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_13basic_istreamIcS2_EE
    {'is_defined': True, 'name': '_ZTCNSt3__119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_13basic_istreamIcS2_EE', 'size': 80, 'type': 'OBJECT'}

SYMBOL REMOVED: _ZTCNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_13basic_ostreamIcS2_EE
    {'is_defined': True, 'name': '_ZTCNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_13basic_ostreamIcS2_EE', 'size': 80, 'type': 'OBJECT'}

SYMBOL REMOVED: _ZTCNSt3__19strstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE
    {'is_defined': True, 'name': '_ZTCNSt3__19strstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 80, 'type': 'OBJECT'}

SYMBOL REMOVED: _ZTCNSt3__19strstreamE0_NS_14basic_iostreamIcNS_11char_traitsIcEEEE
    {'is_defined': True, 'name': '_ZTCNSt3__19strstreamE0_NS_14basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 120, 'type': 'OBJECT'}

SYMBOL REMOVED: _ZTCNSt3__19strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE
    {'is_defined': True, 'name': '_ZTCNSt3__19strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 80, 'type': 'OBJECT'}

Summary
    Added:   35
    Removed: 15
    Changed: 0

-DLIBCXXABI_ENABLE_WERROR=NO \
-DLIBUNWIND_ENABLE_WERROR=NO
check-runtimes
check-abi-list
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you file an issue to track the addition of check-abi-list to the GCC builds? I think this is worth doing and it's definitely not going to be a slam dunk, so we'll want an issue to track it.

@mordante
Copy link
Member Author

This turns out to be an issue on my side.

@mordante mordante closed this Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants