- 精华
- 0
- 帖子
- 3313
- 威望
- 0 点
- 积分
- 3366 点
- 种子
- 586 点
- 注册时间
- 2013-2-21
- 最后登录
- 2025-1-9
|
发表于 2024-10-23 17:54 · 上海
|
显示全部楼层
Fixed a bug affecting memory copying using the functions memcpy() and memmove() in the header <string.h> where synchronization of memory would not be performed correctly if the address of the copying destination and the size of the memory copied met certain conditions. Because of this bug, it could be impossible to read correct values from the data that had been written after either of these functions had been called if doing so from another CPU core. How to determine if synchronization has not been performed correctly is as follows:
If there are overlapping portions of the copying source and destination areas with memmove(), no effects of this bug will manifest.
If the address of the start of the copying destination is not a multiple of 16, subtract from the size the fractional number of bytes up to the 16-byte boundary and an additional 16 bytes.
If the address of the end of the copying destination is not a multiple of 16, subtract from the size the fractional number of bytes from the 16-byte boundary and an additional 16 bytes.
If this size is a multiple of 64 bytes and is 32768 bytes or larger, the effects of this bug will manifest. If this is not the case, no effects of this bug will manifest. |
|