Code that does auto &state_object = *Get<>(handle);
risks use after free bugs.
#7975
Labels
Bug
Something isn't working
Validation code must hold a reference to any state objects it is using. This pattern avoids that and risks use after free bugs from invalid applications. Current list of places this is happening. There could be others that aren't easily findable with grep.
Note that this does not mean you can never use references to state objects, it just means some part of the call stack must hold shared_ptr and it can call other functions passing a reference, eg:
The text was updated successfully, but these errors were encountered: