http://llvm.org/bugs/show_bug.cgi?id=20026

            Bug ID: 20026
           Summary: Clang produces corrupt pch leading to crash in
                    clang::ASTReader::finishPendingActions()
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 12654
  --> http://llvm.org/bugs/attachment.cgi?id=12654&action=edit
A zip archive containing a header, a cpp-file and a script to reproduce the
bug.

Precompiling the attached code leads to a corrupt pch file that makes clang
crash when using it in a later compilation unit.

Steps to reproduce:
1. Adjust the CC and CFLAGS variables in crashIt.sh to point to the version of
clang under test.
2. Run crashIt.sh.

Expected results:
clang compiles both files without error.

Actual results:
clang crashes when compiling EnvelopeTarget.cpp.

Reproducible:
Running the script produces a crash about 9/10 times, but occasionally,
compilation succeeds.

Notes:
The attached code is a stripped down version of the module of our codebase that
triggers this crash. While stripping out code, intermediate versions
occasionally would trigger malloc assertions in clang like the following:

clang(66542,0x7fff7b37a310) malloc: *** error for object 0x104832208: incorrect
checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

At other times, clang complained that exception specifications on some
destructor had changed when both declaration and definition have no exception
specification:

error: exception specification in declaration does not match previous
declaration
inline AEnvelopeTarget::~AEnvelopeTarget() {}

note: previous declaration is here
  virtual ~AEnvelopeTarget() = 0;
                        ^
I tried to strip down the code even further, but the current version appears to
be a minimal example reproducing the issue. Also note that all bogus include
paths on the command line are necessary to reproduce the issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to