Garbage passed as an argument to llvm::Value::setName
Closed this issue · 2 comments
AndreyE commented
LIT test fails on RH6.5 on assertion in llvm::Value::setName (on debug build).
To reproduce:
llvm-lit -v path-to-llvm/test/SPIRV/image-unoptimized.ll
image-unoptimized.bt.txt
yxsamliu commented
The issue was due to saving StringRef of CallInst->getName() for later use. However StringRef is not safe to cache since the pointee may be freed or overwritten.