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
There are various checks in the fast parsing code implemented as debug asserts. I think unfortunately, if the assert is optimized away, it becomes garbage-in-garbage-out, instead of catching a protocol violation from the client.
while (*ptr != '\r')
{
Debug.Assert(*ptr >= '0' && *ptr <= '9');
number = number * 10 + *ptr++ - '0';
if (ptr >= end)
return false;
}
The text was updated successfully, but these errors were encountered:
TimLovellSmith
changed the title
Debug.Asserts don't detect protocol violation
Debug.Asserts don't detect protocol violations reliably
Mar 29, 2024
Yes, this is a known limitation of the current code which was optimized for performance. We are looking into adding back some of the checks in Release mode.
There are various checks in the fast parsing code implemented as debug asserts. I think unfortunately, if the assert is optimized away, it becomes garbage-in-garbage-out, instead of catching a protocol violation from the client.
The text was updated successfully, but these errors were encountered: