[llvm-bugs] [Bug 29119] New: Redefining __DATE__ or __TIME__ with pch causes Assertion failed: (!StoredMD.getLatest() && "the macro history was modified before initializing it from a pch")

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 24 08:32:37 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=29119

            Bug ID: 29119
           Summary: Redefining __DATE__ or __TIME__ with pch causes
                    Assertion failed: (!StoredMD.getLatest() && "the macro
                    history was modified before initializing it from a
                    pch")
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

$ cat header-pch.h  # empty file
$ cat main.c 
const char* s = __DATE__ " " __TIME__;
$ ~/src/llvm-build/bin/clang -D__DATE__= -D__TIME__= header-pch.h -o header.pch
-w
$ ~/src/llvm-build/bin/clang -D__DATE__= -D__TIME__= -include-pch header.pch -c
main.c
Assertion failed: (!StoredMD.getLatest() && "the macro history was modified
before initializing it from a pch"), function setLoadedMacroDirective, file
/Users/thakis/src/llvm-rw/tools/clang/lib/Lex/PPMacroExpansion.cpp, line 74.
Stack dump:
0.    Program arguments: /Users/thakis/src/llvm-build/bin/clang-3.5 -cc1
-triple x86_64-apple-macosx10.10.0 -Wdeprecated-objc-isa-usage
-Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free
-main-file-name main.c -mrelocation-model pic -pic-level 2 -mthread-model posix
-mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 253.3 -dwarf-column-info -debugger-tuning=lldb
-coverage-file /Users/thakis/Downloads/reduced_clang_crash/main.c -resource-dir
/Users/thakis/src/llvm-build/bin/../lib/clang/4.0.0 -include-pch header.pch -D
__DATE__= -D __TIME__= -fdebug-compilation-dir
/Users/thakis/Downloads/reduced_clang_crash -ferror-limit 19 -fmessage-length
248 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.10.0
-fencode-extended-block-signature -fmax-type-align=16 -fdiagnostics-show-option
-fcolor-diagnostics -o main.o -x c main.c 
1.    main.c:1:17: current parser token '__DATE__'
clang-3.5: error: unable to execute command: Abort trap: 6
clang-3.5: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 4.0.0 (trunk 279499)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
InstalledDir: /Users/thakis/src/llvm-build/bin
clang-3.5: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.5: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.5: note: diagnostic msg:
/var/folders/c5/8d7sdn1x2mg92mj0rndghhdr0000gn/T/main-65d9dd.c
clang-3.5: note: diagnostic msg:
/var/folders/c5/8d7sdn1x2mg92mj0rndghhdr0000gn/T/main-65d9dd.sh
clang-3.5: note: diagnostic msg: 

********************

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160824/3ed82c44/attachment.html>


More information about the llvm-bugs mailing list