Undefined behaviour analyzer : Member access within misaligned address
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 1.6k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 126
Description
With the Undefined behaviour analyzer enabled in xcode, I get the following warning
when accessing the **_value_length_** and **_value_** members of FDBKeyValue struct following
a call to fdb_transaction_get_range() :
> Member access within misaligned address 0x0001070c00a6 for type 'const FDBKeyValue' (aka 'const keyvalue'), which requires 4 byte alignment
Is there any way to fix this?
Contributor guide
Research direction
Start by reproducing the warning in Xcode's Undefined Behavior analyzer around fdb_transaction_get_range() and accesses to the FDBKeyValue _value_length_ and _value_ members. Trace the FDBKeyValue definition and returned range data to determine where the alignment issue is introduced. Done means those member accesses no longer trigger the reported misaligned-address warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100