-
Notifications
You must be signed in to change notification settings - Fork 163
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
[BUG] Missing tick overflow protection on u.xTCP.xLastActTime
and u.xTCP.xLastAliveTime
#1183
Comments
Hello @lzungri , thank you for reporting this, but I don't think that there is a problem with mentioned code.
Both Suppose that --- BEGIN EDIT --- Using signed variables would give the same result:
--- END EDIT --- If you feel that I miss the point, please give an example in which things might go wrong. |
@htibosch Thanks for looking into that.
When only one tick overflow has occurred, the result will be correct. I believe the problem will arise when more than 1 tick overflow occurred during that evaluation period. In that case,
|
I do not think that the +TCP is being used on a "16-bit" CPU. At least I don't know of any such project. |
Got it, please let me know if I should close this issue. |
If nobody else has comments on this subject, you may close it. |
I am closing this issue as per the above discussion. Feel free to reopen is you need anything else. |
No tick overflow protection mechanism in place for
u.xTCP.xLastActTime
andu.xTCP.xLastAliveTime
:FreeRTOS-Plus-TCP/source/FreeRTOS_TCP_Transmission.c
Line 969 in d701079
FreeRTOS-Plus-TCP/source/FreeRTOS_TCP_State_Handling.c
Line 183 in d701079
Consider replacing raw arithmetic on the tick count with the safer
xTaskCheckForTimeOut
.The text was updated successfully, but these errors were encountered: