Skip to content

Conversation

@webbnh
Copy link
Member

@webbnh webbnh commented Jul 26, 2023

In the Cache Manager make_cache_object() function there is a possible use-before-assignment hazard. This PR addresses that by ensuring that, in the unlikely event that the assignment fails, we won't execute the use.

(This was a part of #3501, but I decided to pull it out into its own PR.)

@webbnh webbnh added the Server label Jul 26, 2023
@webbnh webbnh added this to the v0.73 milestone Jul 26, 2023
@webbnh webbnh requested review from dbutenhof and ndokos July 26, 2023 19:08
@webbnh webbnh self-assigned this Jul 26, 2023
Copy link
Member

@dbutenhof dbutenhof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems unlikely that we could hit an exception on the statement you moved; but moving it outside of the try makes me inexplicably nervous anyway. 😆

@webbnh webbnh merged commit db87083 into distributed-system-analysis:main Jul 27, 2023
@webbnh webbnh deleted the use_before_init_bug branch July 27, 2023 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants