Addresses #5560.
asio::ip::address::to_string() can throw in some cases, which I believe winxp may be hitting.
I've simulated the case locally by adding:
if (bindAddress.is_v6())
{
boost::system::error_code ec(boost::asio::error::invalid_argument);
boost::asio::detail::throw_error(ec);
}
after the to_string() in order to force the error.
Without the change, bitcoind dies with:
EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEEE
Invalid argument
bitcoin in AppInit()
With the change, it continues and logs:
ERROR: Binding RPC on address ::1 port 36522 failed: Invalid argument
Even if this doesn't fix the crash as intended, I believe it's safe and more correct anyway.