fix(fuzz): data race in evaluateVarsWithInteractsh#6828
fix(fuzz): data race in evaluateVarsWithInteractsh#6828dwisiswant0 merged 1 commit intoprojectdiscovery:devfrom
Conversation
Clone the data map before modification to prevent race conditions when multiple goroutines call evaluateVarsWithInteractsh concurrently with a shared map. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
WalkthroughThis change fixes a concurrent map write race condition in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@yusei-wy tests are failing |
Investigation Report: Integration Test FailureI investigated the failing integration tests and here are my findings: Failing Test
Root Cause AnalysisFrom the CI logs: The test failure is caused by corrupted response from the external Interactsh server, not by the code changes in this PR.
Analysis of PR ChangesThe
This change does not cause the test failure. The test exercises the modified code path, but the failure is due to external Interactsh server communication issues (flaky test). RecommendationCould you please re-run the CI? This appears to be a transient issue with the external Interactsh server communication, not a problem with this PR's changes. |
Summary
Clone the
datamap before modification inevaluateVarsWithInteractshto prevent race conditions when multiple goroutines call this function concurrently with a shared map.Closes #6827
Changes
maps.Clone(data)at the beginning of the interactsh processing block-raceflag after fix)Before
After
Testing
go test -race ./pkg/fuzz/...passesmake vetpassesmake buildsucceeds🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests