Check alignment in getSectionContentsAsArray.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 30 Nov 2017 00:44:22 +0000 (00:44 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 30 Nov 2017 00:44:22 +0000 (00:44 +0000)
commita4e418f71342da5ad67e211557971a40b13db9e8
treef87745ba482c8040442f86e4802cb82f12dc148c
parent80fbb85555b51fbb8c500ec13756490400191865
Check alignment in getSectionContentsAsArray.

While the ArrayRef can technically have unaligned data, it would be
extremely surprising if iterating over it caused undefined behavior
when a reference to the underlying type was bound.

llvm-svn: 319392
llvm/include/llvm/Object/ELF.h
llvm/test/Object/invalid-alignment.test [new file with mode: 0644]