You have a problem with data alignment. This is probably caused by an attempt to read or write through some kind of invalid pointer.
The problem of data alignment is that the address pointed to by the pointer is not aligned properly. For example, some architectures (for example, old Cray 2) require that any attempt to read from memory anything other than one character is carried out only through a pointer in which the last 3 bits of the pointer value are 0. If any of the last 3 bits equal to 1, the hardware will generate an alignment error, which will lead to the problem you see.
Most architectures are not so strict, and often the required alignment depends on which type is used. For example, a 32-bit integer may require that only the last 2 bits of the pointer be 0, and a 64-bit floating point value may require that the last 3 bits be 0.
Alignment problems usually arise from problems of the same type that can cause a SEGFAULT or segmentation error. Usually a pointer that is not initialized. But this can be caused by a bad memory allocator that does not return pointers with the correct alignment, or the result of arithmetic of a pointer on a pointer when it is not of the correct type.
The system implementation of malloc and / or operator new almost certainly true, otherwise your program will crash earlier than at the moment. Therefore, I think that a bad memory allocator is the least likely tree to bark. First, I would check the uninitialized pointer, and then the incorrect pointer arithmetic.
As a side note, the x86 and x86_64 architectures do not have alignment requirements. But because of the way the cache lines work, and for a number of other reasons, it is often recommended for performance to align your data with a border that is equal to the size of the stored data type (that is, a 4-byte border for a 32-bit integer).
source share