http tests: check socket/accept returns in http_max_headers - #132
Merged
Conversation
scan-build (unix.StdCLibraryFunctions) flags the paths where socket() returns -1 and the fd flows into connect()/bind(), and accept() -1 into read(). libevpl's own scan-build job doesn't enable that checker, but chimera's does, so the bump that pulled this test in broke its Analyze jobs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
chimera's Analyze (scan-build) jobs fail on this test since the libevpl bump in chimera-nas/chimera#1513 pulled it in: the
unix.StdCLibraryFunctionschecker flags the paths wheresocket()returns -1 and the fd flows unchecked intoconnect()(line 324) /bind()(line 387). This repo's scan-build job doesn't enable that checker, which is why #130 merged green here.Check the
socket()returns in both spots, and theaccept()return as well — running clang's analyzer with that checker locally reports three findings (the third beingread(cfd)on theaccept() == -1path), so fixing only the two CI reported would just uncover the third on the next chimera run. Three findings before, zero after; all 8 http tests still pass.