Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unaligned access and simplify code #28

Merged
merged 1 commit into from
Sep 3, 2021

Conversation

sjanel
Copy link
Member

@sjanel sjanel commented Sep 3, 2021

Fix unaligned access occurring when using vector of SmallVector of a special type:

[ctest] /home/sjanel/perso/amc/src/test/../include/amc_vectorcommon.hpp:400:96: runtime error: load of misaligned address 0x613000017264 for type 'struct UnalignedToPtr *', which requires 8 byte alignment
[ctest] 0x613000017264: note: pointer points here
[ctest]   00 00 00 00 90 3e 68 00  40 60 00 00 be be be be  be be be be be be be be  be be be be be be be be
[ctest]               ^ 
[ctest]     #0 0x562ec3f78705 in amc::vec::ElemWithPtrStorageImpl<amc::UnalignedToPtr<7u>, false>::dyn() const (/home/sjanel/perso/amc/build/src/test/vectors_test+0xac3705)

The specialization of ElemWithPtrStorageImpl is just not needed actually.

@sjanel sjanel added the bug Something isn't working label Sep 3, 2021
@sjanel sjanel force-pushed the bugfix/fixunalignedaccess branch from b4f9927 to e8bd90c Compare September 3, 2021 09:39
@sjanel sjanel force-pushed the bugfix/fixunalignedaccess branch from e8bd90c to d1a61a1 Compare September 3, 2021 14:00
@sjanel sjanel merged commit b5f91fe into AmadeusITGroup:main Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant