https://llvm.org/bugs/show_bug.cgi?id=23290
Bug ID: 23290
Summary: CompilerInstance::createPreprocessor() leaks the
Preprocessor sometimes
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
CompilerInstance::createPreprocessor should not be called more than once as
this will lead to a memory leak of the Preprocessor PP and probably to multiple
initializations of various other stuff such as what done in
InitializePreprocessor() = all sorts of trouble.
Yet, if an assert is added:
void CompilerInstance::createPreprocessor(TranslationUnitKind TUKind) {
assert(!PP);
three regression tests start failing, meaning they do call
CompilerInstance::createPreprocessor more than once and it's possible scenario.
Clang :: FixIt/fixit-recompile.c
Clang :: Misc/serialized-diags-single-issue.c
Clang :: PCH/local_static.cpp
The first two tests use fixit but the third do not.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs