during network packet prase, we make a pointer from packet buffer usually, but if this is a double field and the memory is not 4 byte aligned, the next operation to the pointer will cause task hang. for example:
// the packet buffer is 4 bytes align char buffer[1024]; // we assume buffer equ 0x80010000 double * p_ratio = (double *)(buffer+3); *p_ratio = 0.0; // task will hang here
Our source code is come from a X86 based module, and there are too many unaligned double access.
is there any way to fix it?