[PATCH] D47247: Fix unaligned memory access when reading INPUT_FILE_OFFSETS data
Raphael Isemann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 23 02:06:45 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL333069: Fix unaligned memory access when reading INPUT_FILE_OFFSETS data (authored by teemperor, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D47247?vs=148158&id=148173#toc
Repository:
rL LLVM
https://reviews.llvm.org/D47247
Files:
cfe/trunk/lib/Serialization/ASTReader.cpp
Index: cfe/trunk/lib/Serialization/ASTReader.cpp
===================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp
+++ cfe/trunk/lib/Serialization/ASTReader.cpp
@@ -4811,7 +4811,8 @@
unsigned NumInputFiles = Record[0];
unsigned NumUserFiles = Record[1];
- const uint64_t *InputFileOffs = (const uint64_t *)Blob.data();
+ const llvm::support::unaligned_uint64_t *InputFileOffs =
+ (const llvm::support::unaligned_uint64_t *)Blob.data();
for (unsigned I = 0; I != NumInputFiles; ++I) {
// Go find this input file.
bool isSystemFile = I >= NumUserFiles;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47247.148173.patch
Type: text/x-patch
Size: 659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180523/6b773d8b/attachment.bin>
More information about the cfe-commits
mailing list