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

lint SyncSender::send #766

Open
apoelstra opened this issue Mar 14, 2016 · 1 comment
Open

lint SyncSender::send #766

apoelstra opened this issue Mar 14, 2016 · 1 comment
Labels
A-lint Area: New lints E-medium Call for participation: Medium difficulty level problem and requires some initial experience. L-correctness Lint: Belongs in the correctness lint group T-middle Type: Probably requires verifiying types

Comments

@apoelstra
Copy link

I'm not sure many people are using the stdlib MPSC with select! destabilized, but I propose a lint that suggests SyncSender::send always be replaced with SyncSender::try_send.

The reason is that many users of SyncSender do not expect their senders to ever block, and are only using SyncSender to prevent bugs on the receiver end from translating into memory-DoS bugs. However, when using send this means that such bugs can translate into DoS anyway by deadlocking.

This should be allow by default.

@Manishearth
Copy link
Member

(this would be amongst the "restrictions" discussed in #632)

@oli-obk oli-obk added L-correctness Lint: Belongs in the correctness lint group E-medium Call for participation: Medium difficulty level problem and requires some initial experience. A-lint Area: New lints T-middle Type: Probably requires verifiying types labels May 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints E-medium Call for participation: Medium difficulty level problem and requires some initial experience. L-correctness Lint: Belongs in the correctness lint group T-middle Type: Probably requires verifiying types
Projects
None yet
Development

No branches or pull requests

3 participants