You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this code, it's perfectly possible for pOldest to still be nullptr when it comes to the end (Which I know from observation).
While this condition has an ASSERT, that doesn't stop it immediately trying to reset the null pointer if you're in a release build, with hilarious consequences.
Easy repro case is to set MICROPROFILE_MAX_THREADS to 1 or 2.
This is a pain if you have a variable number of threads being profiled, so there is no safe level to set MICROPROFILE_MAX_THREADS to.
Possible fix suggestion is to simply fail the function and return nullptr from MicroProfileCreateThreadLog() if it hasn't got any more room. Although this does rather push the problem to the caller.
The text was updated successfully, but these errors were encountered:
In this code, it's perfectly possible for pOldest to still be nullptr when it comes to the end (Which I know from observation).
While this condition has an ASSERT, that doesn't stop it immediately trying to reset the null pointer if you're in a release build, with hilarious consequences.
Easy repro case is to set MICROPROFILE_MAX_THREADS to 1 or 2.
This is a pain if you have a variable number of threads being profiled, so there is no safe level to set MICROPROFILE_MAX_THREADS to.
Possible fix suggestion is to simply fail the function and return nullptr from MicroProfileCreateThreadLog() if it hasn't got any more room. Although this does rather push the problem to the caller.
The text was updated successfully, but these errors were encountered: