[Lldb-commits] [PATCH] D83256: [lldb] Assert on unaligned load in DataExtractor

2020-07-06 Thread Jonas Devlieghere via Phabricator via lldb-commits
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;

[Lldb-commits] [PATCH] D83256: [lldb] Assert on unaligned load in DataExtractor

2020-07-06 Thread Jonas Devlieghere via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D83256: [lldb] Assert on unaligned load in DataExtractor

2020-07-06 Thread Greg Clayton via Phabricator via lldb-commits
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)

[Lldb-commits] [PATCH] D83256: [lldb] Assert on unaligned load in DataExtractor

2020-07-06 Thread Greg Clayton via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D83256: [lldb] Assert on unaligned load in DataExtractor

2020-07-06 Thread Shafik Yaghmour via Phabricator via lldb-commits
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 `

[Lldb-commits] [PATCH] D83256: [lldb] Assert on unaligned load in DataExtractor

2020-07-06 Thread Shafik Yaghmour via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D83256: [lldb] Assert on unaligned load in DataExtractor

2020-07-06 Thread Jonas Devlieghere via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D83256: [lldb] Assert on unaligned load in DataExtractor

2020-07-06 Thread Jonas Devlieghere via Phabricator via lldb-commits
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