[LLVMbugs] [Bug 23290] New: CompilerInstance::createPreprocessor() leaks the Preprocessor sometimes
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Apr 19 11:54:41 PDT 2015
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: unassignedclangbugs at nondot.org
Reporter: yaron.keren at gmail.com
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150419/8040b3e7/attachment.html>
More information about the llvm-bugs
mailing list