Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tamird
Copy link
Contributor

@tamird tamird commented Jan 7, 2026

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.

@tamird
Copy link
Contributor Author

tamird commented Jan 7, 2026

@ayushr2 another one for you.

@tamird tamird force-pushed the improve-checklocksalias branch 4 times, most recently from c56378f to 57b6f50 Compare January 7, 2026 23:57
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.
@tamird tamird force-pushed the improve-checklocksalias branch from 57b6f50 to 22d8b34 Compare January 12, 2026 18:29
@tamird
Copy link
Contributor Author

tamird commented Jan 12, 2026

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) {
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link

@kakkoyun kakkoyun left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants