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

[Proposal]: Add LLVM Thread Safety Analyzer annotations for better developer experience + safety #370

Open
GavinRay97 opened this issue Sep 17, 2022 · 2 comments

Comments

@GavinRay97
Copy link

GavinRay97 commented Sep 17, 2022

You can add some annotations to mutexes when using Clang, and in exchange get static checking for correctness (to a degree)
This is separate from TSAN runtime checks:

For example, here I annotate page_table here with GUARDED_BY(mutex), then it tells me in get_frame that I can't read/write to page_table without holding the mutex guarding it:

clion64_GcOEaCcBSZ.mp4
@skyzh
Copy link
Member

skyzh commented Sep 17, 2022

That's great!!! This is one of the most functionality that I've missed from the Rust programming language when I started to work on the BusTub project.

@skyzh
Copy link
Member

skyzh commented Sep 17, 2022

But we have already started project 1. Code from project 1 will be used throughout the semester. I'd postpone this to next semester.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants