So I am pretty new to asan but I figured I would turn it on for my current project as it's actually supported and it's throwing a fair bit of warnings / errors. mainly in regard to memory loads / stores being misaligned
For example I get:
02:05:29 runtime error: store to misaligned address 0x020600000041 for type 'unsigned long', which requires 8 byte alignment
02:05:29 0x020600000041: note: pointer points here
02:05:29 00 00 00 01 be be be be be be be be be be be be be be be 00 00 00 00 00 00 00 00 00 00 00 00 00
from the code ```cpp
template <class T>
inline void Write(const T& data)
{
EnsureHasRoom(sizeof(T));
((T)mWritePointer) = data;
mWritePointer += sizeof(T);
mUsedSize = std::max(mUsedSize, GetPosition());
}
where mWritePointer is an uint8_t*, I somewhat get what the issue is but I am really not sure how I would go about solving thse types of offisues