mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-20 11:32:33 +00:00
[asan] add the name of the module to the description of a global variable. This improves the readability of global-buffer-overflow reports.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146698 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d239ff67f2
commit
a4b2b1d8fb
@ -521,7 +521,11 @@ bool AddressSanitizer::insertGlobalRedzones(Module &M) {
|
||||
NewTy, G->getInitializer(),
|
||||
Constant::getNullValue(RightRedZoneTy), NULL);
|
||||
|
||||
GlobalVariable *Name = createPrivateGlobalForString(M, G->getName());
|
||||
SmallString<2048> DescriptionOfGlobal = G->getName();
|
||||
DescriptionOfGlobal += " (";
|
||||
DescriptionOfGlobal += M.getModuleIdentifier();
|
||||
DescriptionOfGlobal += ")";
|
||||
GlobalVariable *Name = createPrivateGlobalForString(M, DescriptionOfGlobal);
|
||||
|
||||
// Create a new global variable with enough space for a redzone.
|
||||
GlobalVariable *NewGlobal = new GlobalVariable(
|
||||
|
Loading…
x
Reference in New Issue
Block a user