diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2018-01-23 08:04:27 +0000 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2018-01-23 08:04:27 +0000 |
| commit | acc48f3e1dbd2742d2f61958ca484496e1210c62 (patch) | |
| tree | ce925e43a2a52cbd05ad56b072bbf77503c2253f /llvm/test/CodeGen | |
| parent | e57620308e8f43ba9063c4014f509ac5cafb5f01 (diff) | |
| download | bcm5719-llvm-acc48f3e1dbd2742d2f61958ca484496e1210c62.tar.gz bcm5719-llvm-acc48f3e1dbd2742d2f61958ca484496e1210c62.zip | |
Prevent unaligned memory read in parseMinidumpString
Summary:
It's possible to hit an unaligned memory read when reading `source_length` as the `data` array is only aligned with 2 bytes (it's actually a UTF16 array). This patch memcpy's `source_length` into a local variable to prevent this:
```
MinidumpTypes.cpp:49:23: runtime error: load of misaligned address 0x7f0f4792692a for type 'const uint32_t' (aka 'const unsigned int'), which requires 4 byte alignment
```
Reviewers: dvlahovski, zturner, davide
Reviewed By: davide
Subscribers: davide, lldb-commits
Differential Revision: https://reviews.llvm.org/D42348
llvm-svn: 323181
Diffstat (limited to 'llvm/test/CodeGen')
0 files changed, 0 insertions, 0 deletions

