[cfe-dev] Diagnostic.h : Diagnostic::Report line 836

Michael Mullin masmullin at gmail.com
Mon Nov 1 22:24:48 PDT 2010


Hello

I believe I have found a bug in Diagnostic.h

00836 <http://clang.llvm.org/doxygen/classclang_1_1Diagnostic.html#aa0f6707a3958ae818534b2aca4d3b7af>
inline DiagnosticBuilder
<http://clang.llvm.org/doxygen/classclang_1_1DiagnosticBuilder.html>
Diagnostic::Report
<http://clang.llvm.org/doxygen/classclang_1_1Diagnostic.html#aa0f6707a3958ae818534b2aca4d3b7af>(FullSourceLoc
<http://clang.llvm.org/doxygen/classclang_1_1FullSourceLoc.html> Loc
<http://clang.llvm.org/doxygen/classclang_1_1Loc.html>, unsigned
DiagID){
00837   assert(CurDiagID == ~0U && "Multiple diagnostics in flight at once!");
00838   CurDiagLoc = Loc;
00839   CurDiagID = DiagID;
00840   return DiagnosticBuilder
<http://clang.llvm.org/doxygen/classclang_1_1Diagnostic.html#a97ec9151bbe20af5173173f6de89f3bb>(this);
00841 }

840 will cause a segmentation fault if the return value is used by the
calling function.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101102/8bf0ca81/attachment.html>


More information about the cfe-dev mailing list