You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the aarch64 architecture, atomic instructions have alignment requirements for memory addresses. If these requirements are not met, a bus error may occur.
In C++ code, most objects are created in this form:
void *buf = allocator_.alloc(sizeof(classA));
classA obj = new (buf) classA;
The allocator pre-requests a block of memory from the operating system and initializes objects within this space.This could result in some objects having an improper starting position, leading to errors when executing atomic-related instructions.
For example, some strings require a block of memory to store data. After memory is allocated for the string, the allocated pointer is located at a non-aligned address.
The text was updated successfully, but these errors were encountered:
Remove the atomic-related instructions in the code, as TsFile requests are now independent and there are no concurrency issues, making the use of atomic instructions unnecessary.
Set alignment options for the custom allocator, taking into account the architecture's alignment requirements when returning data pointers.
Good point. If the issue only concerns atomics, we may adopt the first one.
If we are not sure, the second one is more thorough.
I do not know how difficult it is to introduce the aligned feature in the current allocator. If it needs a major refactor, we may change to malloc for such architectures temporarily.
In the aarch64 architecture, atomic instructions have alignment requirements for memory addresses. If these requirements are not met, a bus error may occur.
In C++ code, most objects are created in this form:
The allocator pre-requests a block of memory from the operating system and initializes objects within this space.This could result in some objects having an improper starting position, leading to errors when executing atomic-related instructions.
For example, some strings require a block of memory to store data. After memory is allocated for the string, the allocated pointer is located at a non-aligned address.
The text was updated successfully, but these errors were encountered: