2 ms·
In addition to the others answers, memcpy of size zero is undefined in certain cases. This and the other two bugs can be particularly nasty when doing somethin
by longcommonname 6y ago
In addition to the others answers, memcpy of size zero is undefined in certain cases.
This and the other two bugs can be particularly nasty when doing something such as an arena allocator or any other means of user memory pools.
After an incredibly long slog on some particularly nasty corruption issues years ago I was only able to identify the problem by using ld preload and patching memcpy with some simple value and boundary checks for these three problems. Each of them was a source of the corruption.