[cfe-dev] Clang crashes after update to 3.4 for precompiled header.

Richard Smith richard at metafoo.co.uk
Mon Apr 14 18:55:55 PDT 2014


On Mon, Apr 14, 2014 at 12:21 PM, yogeshbhumkar <yogesh.hifi at gmail.com>wrote:

> Hello,I am working on a c++ project with lot of legacy code. In the
> project,
> we are using precompiled headers. After we updated clang++ to version 3.4,
> for some files which includes precompiled header, clang started to crash
> with this message*Assertion failed:
> Reader.getContext().getLangOpts().Modules && "already deserialized this
> template specialization", file
>
> /s/ndk-toolchain/src/llvm-3.4/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp,
> line 649*
> If I disable use of precomiled headers and instead use .h as it is, then
> clang doesn't crash.
> I am new to clang, so I am not aware such crashes.
> What is meaning of this assert? What are scenarios in which this assert
> fails? What are workarounds for such scenarios?
>

This is a bug. If you can provide a testcase that reproduces it, I'll take
a look.


> There is another issue.After clang++ crashes, I am not able to figure out,
> which line(s) caused the crash. Is there way to find out what line clang
> was
> working on before it crashed? Does it store some log to temporary files?


This should be printed somewhere near the bottom of the crash report.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140414/225c104e/attachment.html>


More information about the cfe-dev mailing list