net: initialize socket to avoid closing random fd’s #12326

pull theuni wants to merge 1 commits into bitcoin:master from theuni:fix-socket-init changing 2 files +4 −1
  1. theuni commented at 3:33 pm on February 1, 2018: member

    An excellent spot by @david60.

    Even if it isn’t causing the fd issue we’re looking for, this should be fixed.

  2. in src/net.cpp:413 in 62e07f01e1 outdated
    409@@ -410,7 +410,7 @@ CNode* CConnman::ConnectNode(CAddress addrConnect, const char *pszDest, bool fCo
    410 
    411     // Connect
    412     bool connected = false;
    413-    SOCKET hSocket;
    414+    SOCKET hSocket = INVALID_SOCKET;
    


    Sjors commented at 3:37 pm on February 1, 2018:
    Why didn’t a linter catch this uninitialized variable?
  3. MarcoFalke added this to the milestone 0.16.0 on Feb 1, 2018
  4. sdaftuar commented at 4:22 pm on February 1, 2018: member
    utACK
  5. promag commented at 4:26 pm on February 1, 2018: member
    utACK 62e07f0.
  6. net: initialize socket to avoid closing random fd's 96dbd381cf
  7. theuni force-pushed on Feb 1, 2018
  8. Sjors commented at 4:34 pm on February 1, 2018: member
    I’m currently running git bisect to figure out where the crashes started. Once that’s done I’ll also check if this commit makes them go away.
  9. laanwj commented at 5:41 pm on February 1, 2018: member
    utACK https://github.com/bitcoin/bitcoin/pull/12326/commits/96dbd381cf0ded169406bab3b1ba911a13d563c5 - this is obviously correct. Hope it solves the issue too.
  10. laanwj added the label Backport on Feb 1, 2018
  11. laanwj added the label P2P on Feb 1, 2018
  12. laanwj added the label Needs backport on Feb 1, 2018
  13. laanwj removed the label Backport on Feb 1, 2018
  14. laanwj referenced this in commit e54c1ac110 on Feb 1, 2018
  15. laanwj merged this on Feb 1, 2018
  16. laanwj closed this on Feb 1, 2018

  17. laanwj referenced this in commit 84291d18dd on Feb 1, 2018
  18. laanwj removed the label Needs backport on Feb 1, 2018
  19. HashUnlimited referenced this in commit 1cb1906bca on Mar 16, 2018
  20. lyricidal referenced this in commit dd3bc8bebd on Nov 17, 2019
  21. lyricidal referenced this in commit 0ffa71a5f9 on Nov 24, 2019
  22. lyricidal referenced this in commit fd7b65ee56 on Nov 24, 2019
  23. PastaPastaPasta referenced this in commit 74d34d1df5 on Jan 26, 2020
  24. PastaPastaPasta referenced this in commit 10d269c2bd on Jan 26, 2020
  25. PastaPastaPasta referenced this in commit 211c8a3a5b on Jan 27, 2020
  26. ckti referenced this in commit 3819f9187c on Mar 28, 2021
  27. gades referenced this in commit 543ab639bb on Jun 25, 2021
  28. MarcoFalke locked this on Sep 8, 2021


theuni Sjors sdaftuar promag laanwj

Labels
P2P

Milestone
0.16.0


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: 2024-10-31 06:12 UTC

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