From 9635aa4d959f1dc6d02ed4e42fa39234776fabd2 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Fri, 18 Mar 2016 21:51:14 +0000 Subject: [PATCH] [obj2yaml, COFF] Assert that the alignment is not bogus llvm-svn: 263839 --- tools/obj2yaml/coff2yaml.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/obj2yaml/coff2yaml.cpp b/tools/obj2yaml/coff2yaml.cpp index 343ed12cf14..aea6fe90d70 100644 --- a/tools/obj2yaml/coff2yaml.cpp +++ b/tools/obj2yaml/coff2yaml.cpp @@ -109,6 +109,7 @@ void COFFDumper::dumpSections(unsigned NumSections) { NewYAMLSection.Header.VirtualAddress = ObjSection.getAddress(); NewYAMLSection.Header.VirtualSize = COFFSection->VirtualSize; NewYAMLSection.Alignment = ObjSection.getAlignment(); + assert(NewYAMLSection.Alignment <= 8192); ArrayRef sectionData; if (!ObjSection.isBSS())