Open data-forms-action opened 5 years ago
FDB doesn't align memory correctly. One reason is the Arena allocator that simply returns memory from an blob without any alignment. I started working at this in #1263 but this is much harder than expected...
btw: if you check the clang documentation (here: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) it seems you could disable the alignment check. This is obviously not a fix but for now this is the best you can do. Eventually we probably should make all data access aligned but this will be a mid-size project and we don't have resource to tackle this right now.
With the Undefined behaviour analyzer enabled in xcode, I get the following warning when accessing the _valuelength and value members of FDBKeyValue struct following a call to fdb_transaction_get_range() :
Is there any way to fix this?