mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 09:45:00 +00:00
tools: fix heap-buffer-overrun detected via ASAN
Once the auxiliary fields relating to the filename have been inspected, any following auxiliary fields need not be visited as they have been consumed (the following fields comprise the filepath as a single unit). Adjust the test to catch this even if ASAN is not enabled. llvm-svn: 206190
This commit is contained in:
parent
5698dfd860
commit
27e18491ee
@ -2,4 +2,5 @@ RUN: llvm-objdump -t %p/Inputs/file.obj.coff-arm | FileCheck %s
|
||||
|
||||
CHECK: .file
|
||||
CHECK-NEXT: AUX /Users/compnerd/work/llvm/test/tools/llvm-readobj/Inputs/file.asm
|
||||
CHECK-NEXT: [{{[ 0-9]+}}]
|
||||
|
||||
|
@ -708,6 +708,9 @@ static void PrintCOFFSymbolTable(const COFFObjectFile *coff) {
|
||||
StringRef Name(AF->FileName,
|
||||
Symbol->NumberOfAuxSymbols * COFF::SymbolSize);
|
||||
outs() << "AUX " << Name.rtrim(StringRef("\0", 1)) << '\n';
|
||||
|
||||
SI = SI + Symbol->NumberOfAuxSymbols;
|
||||
break;
|
||||
} else {
|
||||
outs() << "AUX Unknown\n";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user