fuzz: Avoid use of low file descriptor ids (which may be in use) in FuzzedSock#21677
Conversation
|
Concept ACK but this seems a bit… arbitrary. If you want to be 100% certain to not step on an existing one, could you open a (real) file descriptor, connected to something like a |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Right! It does not need to be connected to anything. Just reuse this: bitcoin/src/test/sock_tests.cpp Lines 30 to 35 in 03eccee plus a |
The nice thing about going with Note that Note that this PR is only a short-term bug fix to avoid file descriptors stdin (0), stdout (1), stderr (2) and other likely to be used file descriptors while awaiting vasild's suggested cleanup/refactoring. |
…ock and StaticContentsSock
6464d10 to
6262182
Compare
|
The chosen constant Lines 100 to 106 in 2cd834e I think that's ok. I am working on a change to convert |
|
#21700 reduces the usage of |
Avoid use of low file descriptor ids (which may be in use) in
FuzzedSock.Context: https://github.com/bitcoin/bitcoin/pull/21630/files#r610694541