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

embassy_stm32: rcc::frequency() is UB if called before init() #3099

Open
GrantM11235 opened this issue Jun 19, 2024 · 0 comments
Open

embassy_stm32: rcc::frequency() is UB if called before init() #3099

GrantM11235 opened this issue Jun 19, 2024 · 0 comments

Comments

@GrantM11235
Copy link
Contributor

rcc::frequency() is a public function, and there is nothing preventing a user from calling it before init(). Internally it calls unsafe { rcc::get_freqs() } which is UB if rcc::set_freqs() hasn't been called yet.

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

1 participant