Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

crash because alignment of key is not respected #173

Open
HSNB opened this issue Jun 21, 2023 · 1 comment
Open

crash because alignment of key is not respected #173

HSNB opened this issue Jun 21, 2023 · 1 comment

Comments

@HSNB
Copy link

HSNB commented Jun 21, 2023

this unordered_map does not respect memory alignment requirements of Key

@HSNB
Copy link
Author

HSNB commented Jun 21, 2023

Crash on
if (WKeyEqual::operator()(key, mKeyVals[idx].getFirst())) {

mKeyVals array does not respect memory alignment of Key, so a Key with a 16 byte requirement will crash on this code

I also believe this unordered_map does not respect memory alignment requirements of Value, but I could not test because it already crashes on Key. Even though the contents of robin_hood.h contains some code with alignment_of and such checks, it is defective and does not cover all memory

Key: __m128
Value: __m128

32-bit compilation

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant