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: protect Context.Keys map when call Copy method #3873

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

kingcanfish
Copy link
Contributor

// This mutex protects Keys map.
mu sync.RWMutex

In Copy method Context.Keys should be protected by Context.mu to aviod DATA RACE

@appleboy appleboy added the bug label Mar 9, 2024
Copy link

codecov bot commented Mar 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.36%. Comparing base (3dc1cd6) to head (5a8f925).
Report is 13 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3873      +/-   ##
==========================================
+ Coverage   99.21%   99.36%   +0.15%     
==========================================
  Files          42       43       +1     
  Lines        3182     2679     -503     
==========================================
- Hits         3157     2662     -495     
+ Misses         17        9       -8     
  Partials        8        8              
Flag Coverage Δ
?
-race ∅ <ø> (?)
-tags "sonic avx" 99.36% <100.00%> (?)
-tags go_json 99.36% <100.00%> (?)
-tags nomsgpack 99.35% <100.00%> (?)
go-1.18 99.29% <100.00%> (+0.17%) ⬆️
go-1.19 99.36% <100.00%> (+0.15%) ⬆️
go-1.20 99.36% <100.00%> (+0.15%) ⬆️
go-1.21 99.36% <100.00%> (+0.15%) ⬆️
go-1.22 99.36% <100.00%> (?)
macos-latest 99.36% <100.00%> (+0.15%) ⬆️
ubuntu-latest 99.36% <100.00%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@appleboy appleboy added this to the v1.10 milestone Mar 11, 2024
@appleboy appleboy merged commit 646312a into gin-gonic:master Mar 11, 2024
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants