Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Return correct error in Corpus.Initialize #537

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

MukulKolpe
Copy link
Contributor

The current code incorrectly returns 'err' instead of 'covErr' when handling errors during coverage map updates in Corpus.Initialize. Replaced 'err' with 'covErr' in fuzzing/corpus/corpus.go.

for _, block := range testChain.CommittedBlocks() {
    for _, messageResults := range block.MessageResults {
        covMaps := coverage.GetCoverageTracerResults(messageResults)
        _, _, covErr := c.coverageMaps.Update(covMaps)
        if covErr != nil {
-           return 0, 0, err
+           return 0, 0, covErr
        }
    }
}

Resolves #510

@CLAassistant
Copy link

CLAassistant commented Jan 14, 2025

CLA assistant check
All committers have signed the CLA.

@anishnaik anishnaik merged commit 68a14ff into crytic:master Jan 14, 2025
12 checks passed
@MukulKolpe MukulKolpe deleted the covErr branch January 14, 2025 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong error value returned in Corpus.Initialize
3 participants