Issue 76662
Summary Problem with SDL option in visual studio project
Labels new issue
Assignees
Reporter Panadulek
    When i have turn on SDL option then come assertion failure (_CrtlsValidHeapPointer(block)) on clearing Function List. But when i turn off SDL option in project everything is OK.

Sample which give me error
```
	llvm::LLVMContext context;
	llvm::IRBuilder<> builder(context);
	llvm::Module* module = new llvm::Module("testModule", context);
	llvm::FunctionType* funcType = llvm::FunctionType::get(builder.getInt32Ty(), false);
	llvm::Function* function = llvm::Function::Create(funcType, llvm::Function::ExternalLinkage, "testFunction", module);
	llvm::BasicBlock* basicBlock = llvm::BasicBlock::Create(context, "entry", function);
	builder.SetInsertPoint(basicBlock);
	llvm::AllocaInst* localVariable = builder.CreateAlloca(builder.getInt32Ty(), nullptr, "localVar");
	builder.CreateRet(llvm::ConstantInt::get(context, llvm::APInt(32, 0)));
	module->print(llvm::outs(), nullptr);
	delete module; // <-- assertion failed happens
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to