JDevlieghere marked an inline comment as done.
JDevlieghere added inline comments.
Comment at: lldb/include/lldb/Utility/DataExtractor.h:1000-1004
+ uint8_t *dst_data = reinterpret_cast(&val);
+ const uint8_t *src_data = reinterpret_cast(src);
+ for (size_t i = 0;
JDevlieghere updated this revision to Diff 275862.
JDevlieghere marked 9 inline comments as done.
JDevlieghere added a comment.
Thanks for the clarifications Greg!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83256/new/
https://reviews.llvm.org/D83256
Files:
lldb/include/lldb/Utilit
clayborg requested changes to this revision.
clayborg added inline comments.
This revision now requires changes to proceed.
Comment at: lldb/include/lldb/Utility/DataExtractor.h:24-28
+#ifndef __builtin_is_aligned
+#define __builtin_is_aligned(POINTER, BYTE_COUNT)
clayborg added a comment.
There is no requirement that data be aligned when stored in a buffer that
DataExtractor points to, so this patch doesn't seem correct. Since GetData()
calls can return unaligned pointers, the usual way to make this work is to to
make a local variable and do a memcpy in
shafik added inline comments.
Comment at: lldb/include/lldb/Utility/DataExtractor.h:24
+#ifndef __builtin_is_aligned
+#define __builtin_is_aligned(POINTER, BYTE_COUNT)
\
shafik wrote:
> What platforms are we not expecting to have `
shafik added inline comments.
Comment at: lldb/include/lldb/Utility/DataExtractor.h:24
+#ifndef __builtin_is_aligned
+#define __builtin_is_aligned(POINTER, BYTE_COUNT)
\
What platforms are we not expecting to have `__builtin_is_ali
JDevlieghere added a comment.
Pavel, would you mind taking a look at the unaligned load in `TestLinuxCore.py`?
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83256/new/
https://reviews.llvm.org/D83256
___
lldb-commi
JDevlieghere created this revision.
JDevlieghere added reviewers: labath, clayborg.
Somehow UBSan would only report the unaligned load in `TestLinuxCore.py` when
running the tests with reproducers. This patch adds an assert for the
`GetDouble` and `GetFloat` method, which triggers regardless of