[llvm] r263839 - [obj2yaml, COFF] Assert that the alignment is not bogus
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 18 14:51:15 PDT 2016
Author: majnemer
Date: Fri Mar 18 16:51:14 2016
New Revision: 263839
URL: http://llvm.org/viewvc/llvm-project?rev=263839&view=rev
Log:
[obj2yaml, COFF] Assert that the alignment is not bogus
Modified:
llvm/trunk/tools/obj2yaml/coff2yaml.cpp
Modified: llvm/trunk/tools/obj2yaml/coff2yaml.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/obj2yaml/coff2yaml.cpp?rev=263839&r1=263838&r2=263839&view=diff
==============================================================================
--- llvm/trunk/tools/obj2yaml/coff2yaml.cpp (original)
+++ llvm/trunk/tools/obj2yaml/coff2yaml.cpp Fri Mar 18 16:51:14 2016
@@ -109,6 +109,7 @@ void COFFDumper::dumpSections(unsigned N
NewYAMLSection.Header.VirtualAddress = ObjSection.getAddress();
NewYAMLSection.Header.VirtualSize = COFFSection->VirtualSize;
NewYAMLSection.Alignment = ObjSection.getAlignment();
+ assert(NewYAMLSection.Alignment <= 8192);
ArrayRef<uint8_t> sectionData;
if (!ObjSection.isBSS())
More information about the llvm-commits
mailing list