Closed hxef closed 1 year ago
Thanks for the pr!
BTW: Is this the real issue? From MemoryManager.h (same thing in CommonLibSSE
btw):
[[nodiscard]] inline void* calloc(std::size_t a_num, std::size_t a_size)
{
return malloc(a_num * a_size);
}
@clayne correct, I think the real fix should've been in the calloc function, something like this:
[[nodiscard]] inline void* calloc(std::size_t a_num, std::size_t a_size)
{
auto ret = malloc(a_num * a_size);
memset(ret, 0, a_num * a_size);
return ret;
}
@Ryan-rsm-McKenzie could you revert this PR? As per discord discussion in the fallout channel, I got a suggestion to create another one that handles it at the source of the problem, namely in the calloc() function.
calloc appears to return random data instead of initializing the flag list with zeros.
This results in inconsistent behavior when modifying the extra data list. Given that methods such as HasType or MarkType check these flags to verify if an extra data type is part of the list.