Bugfix: strerror_r can return an error, and if it does, POSIX does not specify the content of the buffer #4479

pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:bugfix_xsi_strerror_r changing 1 files +2 −1
  1. luke-jr commented at 3:34 PM on July 7, 2014: member

    No description provided.

  2. Bugfix: strerror_r can return an error, and if it does, POSIX does not specify the content of the buffer 109849e204
  3. gavinandresen commented at 3:56 PM on July 7, 2014: contributor

    Code review ACK. Is there an easy way to test this?

  4. luke-jr commented at 3:59 PM on July 7, 2014: member

    If you use a errno that is considered out of range, it should fail. But determining what any given OS considers out of range may make an automated unit test impractical.

  5. laanwj commented at 3:59 PM on July 7, 2014: member

    If you're on a posix system and run bitcoind for a while, you should get the network error messages in the log as text:

    2014-07-03 08:31:19 socket recv error Connection reset by peer (104)
    

    If this change broke it, it will just show (104).

    A unit test would indeed be difficult as the content of error messages is not guaranteed, certainly not between Windows and Linux.

  6. BitcoinPullTester commented at 5:18 PM on July 7, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4479_109849e204f91d8b04b0e57da87e45b461096b50/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  7. laanwj commented at 11:02 AM on July 8, 2014: member

    ACK, works for me.

    2014-07-08 10:37:00 socket send error Connection timed out (110)
    
  8. laanwj merged this on Jul 8, 2014
  9. laanwj closed this on Jul 8, 2014

  10. laanwj referenced this in commit 418d4ad110 on Jul 8, 2014
  11. sipa commented at 6:53 PM on July 8, 2014: member

    2014-07-08 18:51:36 socket send error (110)

  12. luke-jr deleted the branch on Oct 19, 2014
  13. pyritepirate referenced this in commit 4a68069f20 on Jan 25, 2019
  14. DrahtBot 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 18:15 UTC

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