aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2022-05-11 16:53:36 -0400
committerJoseph Huber <jhuber6@vols.utk.edu>2022-05-11 16:56:41 -0400
commit42a1fb5ca56c494e25419a97057a9526f3e8608d (patch)
treeea8393fb7a229c7ed9afde8af7b229eb041d6bc2 /clang/lib/Frontend/CompilerInvocation.cpp
parent2db700215a2eebce7358c0a81a3d52d0a9d4a997 (diff)
downloadllvm-42a1fb5ca56c494e25419a97057a9526f3e8608d.zip
llvm-42a1fb5ca56c494e25419a97057a9526f3e8608d.tar.gz
llvm-42a1fb5ca56c494e25419a97057a9526f3e8608d.tar.bz2
[LinkerWrapper][Fix} Fix bad alignment from extracted archive members
Summary: We use embedded binaries to extract offloading device code from the host fatbinary. This uses a binary format whose necessary alignment is eight bytes. The alignment is included within the ELF section type so the data extracted from the ELF should always be aligned at that amount. However, if this file was extraqcted from a static archive, it was being sent as an offset in the archive file which did not have the same alignment guaruntees as the ELF file. This was causing errors in the UB-sanitizer build as it would occasionally try to access a misaligned address. To fix this, I simply copy the memory directly to a new buffer which is guarnteed to have worst-case alignment of 16 in the case that it's not properly aligned.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions