-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory corruption #1701
Comments
Valgrind is silent here. Miscompilation? |
Hmmm. Interesting. Release build is valgrind-clean. But Debug - not: ==29944== Invalid read of size 4
|
I will continue to investigate with Visual Studio. It has some powerful |
akor, does your run include this patch? |
Thanks for digging in Jeff! |
Well. Seems it wasn't. TOT is valgrind-clean for me. |
Found it. SmallPtrSetImpl lacks a copy constructor. The default constructor |
Extended Description
While trying to debug a different problem using Visual Studio, I encountered a
memory corruption that appears to go unnoticed on Unix:
and the stack trace is:
C++
msvcr71d.dll!operator delete[](void * p=0x0012f100) Line 21 + 0x9 C++
opt.exe!llvm::SmallPtrSetImpl::~SmallPtrSetImpl() Line 69 + 0x17 C++
opt.exe!llvm::SmallPtrSet<llvm::Instruction
*,16>::~SmallPtrSet<llvm::Instruction *,16>() + 0x2b C++
opt.exe!llvm::SmallSet<llvm::Instruction *,16>::~SmallSet<llvm::Instruction
*,16>() + 0x2b C++
opt.exe!llvm::SetVector<llvm::Instruction *,std::vector<llvm::Instruction
*,std::allocator<llvm::Instruction *> >,llvm::SmallSet<llvm::Instruction *,16>
opt.exe!llvm::PassManagerImpl::run(llvm::Module & M={...}) Line 1174 +
0x10 C++
opt.exe!llvm::PassManager::run(llvm::Module & M={...}) Line 1207 C++
opt.exe!main(int argc=6, char * * argv=0x00325cb8) Line 358 C++
opt.exe!mainCRTStartup() Line 398 + 0x11 C
kernel32.dll!7c816fd7()
ntdll.dll!7c915b4f()
The command to reproduce with the attached bytecode file is:
opt -std-compile-opts Output/primes.linked.rbc -o Output/primes.linked.bc -f
The text was updated successfully, but these errors were encountered: