mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-23 20:15:35 +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.
llvm-svn: 146698
This commit is contained in:
parent
31c6f9b096
commit
847d2d2c25
@ -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…
Reference in New Issue
Block a user