This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] proposed fix for libstdc++/49204 causes abi_check failure


I want to commit the attached patch:

        PR libstdc++/49204
        * include/std/future (__future_base::_State_base::wait()): Call
        _M_complete_async instead of _M_run_deferred.
        (__future_base::_State_base::wait_for()): Call _M_has_deferred and
        return future_status.
        (__future_base::_State_base::wait_until()): Likewise.
        (__future_base::_State_base::_M_run_deferred()): Rename to ...
        (__future_base::_State_base::_M_complete_async()): This.
        (__future_base::_State_base::_M_has_deferred()): New.
        (__basic_future::wait_for(), __basic_future::wait_until()): Return
        future_status.
        (__future_base::_Deferred_state::_M_run_deferred()): Rename to ...
        (__future_base::_Deferred_state::_M_complete_async()): This.
        (__future_base::_Async_state::_M_join()): New.
        (__future_base::_Async_state::~_Async_state()): Call _M_join.
        (__future_base::_Async_state::_M_complete_async()): Likewise.
        * testsuite/30_threads/packaged_task/members/get_future.cc: Expect
        future_status return instead of bool.
        * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
        * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
        * testsuite/30_threads/future/members/wait_until.cc: Likewise.
        * testsuite/30_threads/future/members/wait_for.cc: Likewise.
        * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
        * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
        * testsuite/30_threads/promise/members/swap.cc: Likewise.
        * testsuite/30_threads/async/sync.cc: Likewise, and test 'deferred'
        status.

But it causes this abi_check error:

1 incompatible symbols
0
_ZTVNSt13__future_base11_State_baseE
vtable for std::__future_base::_State_base
version status: unversioned
type: object
type size: 48
status: <default>

        incompatible sizes
        40
        48

I've renamed _M_run_deferred to _M_complete_async but it has the same
signature, semantics and position in the vtable.  I've also added
_M_has_deferred() at the end of the vtable, for an internal
implementation type that users use directly or refer to. Is that OK
and the testsuite can be adjusted to know about the new vtable size?

Attachment: 49204.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]