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
On PACE we noticed the upper bits of the free space entry jumping.
The bug is in the function OS_fsBytesFree in the file osal/src/os/vxworks6
The function has the following line
bytes_free_local = stat_buf.f_bfree * stat_buf.f_bsize;
where bytes_free_local is a uint64 and the bfree and bsize are 32 bit numbers. When the result of the multiplication is a number greater than 0xFFFF FFFF, bytes_free_local gives an incorrect result, where lower 32 bits are correct but upper 32 bits is set to 0xFFFFFFFF
The line was modified as follows to give the right results when bytes_free_local is greater than 4GBytes
bytes_free_local = (uint64)((uint64)(stat_buf.f_bfree) * (uint64)(stat_buf.f_bsize));
The text was updated successfully, but these errors were encountered:
OS_fsBytesFree was deprecated in #759 due in part to this issue. Glad you fixed for your use but issue doesn't apply to the current code base. Duplicate of #718.
On PACE we noticed the upper bits of the free space entry jumping.
The bug is in the function OS_fsBytesFree in the file osal/src/os/vxworks6
The function has the following line
bytes_free_local = stat_buf.f_bfree * stat_buf.f_bsize;
where bytes_free_local is a uint64 and the bfree and bsize are 32 bit numbers. When the result of the multiplication is a number greater than 0xFFFF FFFF, bytes_free_local gives an incorrect result, where lower 32 bits are correct but upper 32 bits is set to 0xFFFFFFFF
The line was modified as follows to give the right results when bytes_free_local is greater than 4GBytes
bytes_free_local = (uint64)((uint64)(stat_buf.f_bfree) * (uint64)(stat_buf.f_bsize));
The text was updated successfully, but these errors were encountered: