[cfe-dev] Bug in Preprocessor::HandlePragmaDirective ?
Chris Lattner
clattner at apple.com
Wed Jun 17 22:56:09 PDT 2009
On Jun 17, 2009, at 6:54 AM, Peter Thoman wrote:
> 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
> >)
Yep, that's the right fix, I committed it with r73689, thanks!
-Chris
More information about the cfe-dev
mailing list