[cfe-dev] Bug in Preprocessor::HandlePragmaDirective ?
Peter Thoman
peter.thoman at uibk.ac.at
Wed Jun 17 06:54:20 PDT 2009
In Pragma.cpp, line 96:
if (CurPPLexer->ParsingPreprocessorDirective <http://clang.llvm.org/doxygen/classclang_1_1PreprocessorLexer.html#6388ce47d19b9f7d0c703c643ab903a5>)
Is this correct? We got a segmentation fault [1] there (CurPPLexer is
null) in our application. I could reproduce it with a small sample
program [2] and even smaller input file [3] using pragma namespaces.
We fixed the immediate problem locally by changing the line above to
if (CurPPLexer&& CurPPLexer->ParsingPreprocessorDirective <http://clang.llvm.org/doxygen/classclang_1_1PreprocessorLexer.html#6388ce47d19b9f7d0c703c643ab903a5>)
but I'm not quite sure that this is the correct way of doing it.
[1] http://pastebin.com/d48a6b613
[2] http://pastebin.com/m20e46def
[3] http://pastebin.com/d1584397c
More information about the cfe-dev
mailing list