forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: crash if try to upgradetohd descriptor wallet #6089
Merged
PastaPastaPasta
merged 1 commit into
dashpay:develop
from
knst:fix-crash-upgradetohd-descriptors
Jul 2, 2024
Merged
fix: crash if try to upgradetohd descriptor wallet #6089
PastaPastaPasta
merged 1 commit into
dashpay:develop
from
knst:fix-crash-upgradetohd-descriptors
Jul 2, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Posix Signal: Segmentation fault 0#: (0x55A0C7658814) stl_vector.h:115 - std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data::_M_copy_data(std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data const&) 1#: (0x55A0C7658814) stl_vector.h:127 - std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data::_M_swap_data(std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data&) 2#: (0x55A0C7658814) stl_vector.h:1959 - std::vector<unsigned long, std::allocator<unsigned long> >::_M_move_assign(std::vector<unsigned long, std::allocator<unsigned long> >&&, std::integral_constant<bool, true>) 3#: (0x55A0C7658814) stl_vector.h:768 - std::vector<unsigned long, std::allocator<unsigned long> >::operator=(std::vector<unsigned long, std::allocator<unsigned long> >&&) 4#: (0x55A0C7658814) stacktraces.cpp:777 - HandlePosixSignal 5#: (0x744F89C42990) libc_sigaction.c - ??? 6#: (0x55A0C7789926) scriptpubkeyman.cpp:418 - LegacyScriptPubKeyMan::GenerateNewHDChain(std::__cxx11::basic_string<char, std::char_traits<char>, secure_allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, secure_allocator<char> > const&) 7#: (0x55A0C77BEC2E) wallet.cpp:5033 - CWallet::UpgradeToHD(std::__cxx11::basic_string<char, std::char_traits<char>, secure_allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, secure_allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, secure_allocator<char> > const&, bilingual_str&) 8#: (0x55A0C775B85F) rpcwallet.cpp:2839 - operator() 9#: (0x55A0C775BBB4) std_function.h:292 - _M_invoke 10#: (0x55A0C72D4BC2) univalue.h:17 - UniValue::operator=(UniValue&&) 11#: (0x55A0C72D4BC2) server.h:110 - CRPCCommand::CRPCCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, RPCHelpMan (*)(), std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >)::{lambda(JSONRPCRequest const&, UniValue&, bool)#1}::operator()(JSONRPCRequest const&, UniValue&, bool) const 12#: (0x55A0C76ED57C) basic_string.h:792 - std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() 13#: (0x55A0C76ED57C) request.h:29 - JSONRPCRequest::~JSONRPCRequest() 14#: (0x55A0C76ED57C) interfaces.cpp:576 - operator() 15#: (0x55A0C723B3D9) std_function.h:292 - _M_invoke 16#: (0x55A0C73D4FFC) std_function.h:591 - std::function<bool (JSONRPCRequest const&, UniValue&, bool)>::operator()(JSONRPCRequest const&, UniValue&, bool) const 17#: (0x55A0C73D4FFC) server.cpp:609 - ExecuteCommand 18#: (0x55A0C73D4FFC) server.cpp:528 - CRPCTable::execute(JSONRPCRequest const&) const 19#: (0x55A0C72421FB) basic_string.h:223 - std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data() const 20#: (0x55A0C72421FB) basic_string.h:264 - std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_is_local() const 21#: (0x55A0C72421FB) basic_string.h:282 - std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose() 22#: (0x55A0C72421FB) basic_string.h:792 - std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() 23#: (0x55A0C72421FB) request.h:29 - JSONRPCRequest::~JSONRPCRequest() 24#: (0x55A0C72421FB) interfaces.cpp:487 - executeRpc 25#: (0x55A0C6F37700) univalue.h:17 - UniValue::operator=(UniValue&&) 26#: (0x55A0C6F37700) rpcconsole.cpp:338 - RPCConsole::RPCParseCommandLine(interfaces::Node*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, WalletModel const*) 27#: (0x55A0C6F38475) rpcconsole.cpp:444 - RPCExecutor::request(QString const&, WalletModel const*) 28#: (0x55A0C8064490) <unknown-file> - ??? 29#: (0x55A0C82E95B2) <unknown-file> - ??? Aborted (core dumped)
UdjinM6
approved these changes
Jul 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
PastaPastaPasta
approved these changes
Jul 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK e708a4b
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
If
upgradetohd
is called for blank descriptor wallet it can cause a crash:What was done?
Added a guard in UpgradeToHD that wallet is not descriptor wallet.
How Has This Been Tested?
Create wallet "Blank" + "Descriptor".
Call rpc "upgradetohd" -> no crash
Breaking Changes
N/A
Checklist: