rpcserver: attempt to fix uncaught exception. #5565

pull theuni wants to merge 1 commits into bitcoin:master from theuni:winxp-uncaught-exception changing 1 files +9 −7
  1. theuni commented at 8:47 PM on December 29, 2014: member

    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.

  2. rpcserver: attempt to fix uncaught exception. 8db1760751
  3. jgarzik added the label Bug on Dec 30, 2014
  4. jgarzik added the label Priority High on Dec 30, 2014
  5. jgarzik added the label RPC on Dec 30, 2014
  6. laanwj commented at 4:32 PM on December 30, 2014: member

    ACK Thanks for checking this out.

  7. laanwj added this to the milestone 0.10.0 on Dec 30, 2014
  8. laanwj merged this on Dec 30, 2014
  9. laanwj closed this on Dec 30, 2014

  10. laanwj referenced this in commit f9c571aad8 on Dec 30, 2014
  11. laanwj referenced this in commit 87d43a3c8e on Dec 30, 2014
  12. reddink referenced this in commit 182478e827 on May 27, 2020
  13. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me