-
Notifications
You must be signed in to change notification settings - Fork 1.5k
checklocks: move checklocksalias to type #12459
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
base: master
Are you sure you want to change the base?
Conversation
|
@ayushr2 another one for you. |
c56378f to
57b6f50
Compare
Repurpose checklocksalias as a type-level annotation so alias relationships are declared once per type instead of per call. Update tcp/ipv4 annotations accordingly and drop per-call workarounds. Enhance checklocksfail to allow substring matching so that robust tests for checklocksalias are possible.
57b6f50 to
22d8b34
Compare
|
Ping. This PR is a really nice improvement IMO because it centralizes and greatly reduces the number of alias annotations needed in the presence of circular references. |
|
|
||
| // +checklocks:ep.mu | ||
| func newSender(ep *Endpoint, iss, irs seqnum.Value, sndWnd seqnum.Size, mss uint16, sndWndScale int) *sender { | ||
| func initSender(ep *Endpoint, iss, irs seqnum.Value, sndWnd seqnum.Size, mss uint16, sndWndScale int) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to do that in this patch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because otherwise we have a floating sender that isn't attached to the endpoint, so checklocks can't see that the mutex is the same.
kakkoyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. This is a great improvement! Looking forward to having this.
Repurpose checklocksalias as a type-level annotation so alias
relationships are declared once per type instead of per call. Update
tcp/ipv4 annotations accordingly and drop per-call workarounds.
Enhance checklocksfail to allow substring matching so that robust tests
for checklocksalias are possible.