Skip to content

PCH Crash when a referenced file is removed #4591

@llvmbot

Description

@llvmbot
Bugzilla Link 4219
Resolution FIXED
Resolved on Feb 22, 2010 12:47
Version unspecified
OS All
Reporter LLVM Bugzilla Contributor
CC @DougGregor

Extended Description

Spotted by someone on IRC:

ddunbar@ozzy:tmp$ mkdir foo
ddunbar@ozzy:tmp$ cd foo
ddunbar@ozzy:foo$ touch 1.h
ddunbar@ozzy:foo$ touch 1.c
ddunbar@ozzy:foo$ clang 1.h -o 1.h.pch
ddunbar@ozzy:foo$ rm 1.h
ddunbar@ozzy:foo$ clang -include 1.h 1.c
Assertion failed: (FileEnt && "Didn't specify a file entry to use?"), function getOrCreateContentCache, file /tmp/clang-16.roots/clang-16/clang/tools/clang/lib/Basic/SourceManager.cpp, line 278.
0 clang-cc 0x0000000100bd00c2
1 clang-cc 0x0000000100bd0756
2 libSystem.B.dylib 0x00007fff886bb58a _sigtramp + 26
3 libSystem.B.dylib 000000000000000000 _sigtramp + 2006207120
4 libSystem.B.dylib 0x00007fff88719dee __assert_rtn + 237
5 clang-cc 0x000000010041adbe
6 clang-cc 0x00000001002be9dc
7 clang-cc 0x00000001002c1462
8 clang-cc 0x00000001002c257f
9 clang-cc 0x000000010006fdfb
10 clang-cc 0x00000001000734df
11 clang-cc 0x0000000100017268
Stack dump:
0. Program arguments: /Developer/usr/bin/../libexec/clang-cc -triple x86_64-apple-darwin10 -S -disable-free -main-file-name 1.c --relocation-model pic -pic-level=1 --disable-fp-elim --unwind-tables=1 --fmath-errno=0 -mmacosx-version-min=10.6.0 -include-pch 1.h.pch -fdiagnostics-show-option -o /var/folders/MP/MP5slYG8HRCD2v6HHtqYEE+++TI/-Tmp-/cc-jYgD5N.s -x c 1.c
ddunbar@ozzy:tmp$ mkdir foo
ddunbar@ozzy:tmp$ cd foo
ddunbar@ozzy:foo$ touch 1.h
ddunbar@ozzy:foo$ touch 1.c
ddunbar@ozzy:foo$ clang 1.h -o 1.h.pch
ddunbar@ozzy:foo$ rm 1.h
ddunbar@ozzy:foo$ clang -include 1.h 1.c
Assertion failed: (FileEnt && "Didn't specify a file entry to use?"), function getOrCreateContentCache, file /tmp/clang-16.roots/clang-16/clang/tools/clang/lib/Basic/SourceManager.cpp, line 278.
0 clang-cc 0x0000000100bd00c2
1 clang-cc 0x0000000100bd0756
2 libSystem.B.dylib 0x00007fff886bb58a _sigtramp + 26
3 libSystem.B.dylib 000000000000000000 _sigtramp + 2006207120
4 libSystem.B.dylib 0x00007fff88719dee __assert_rtn + 237
5 clang-cc 0x000000010041adbe
6 clang-cc 0x00000001002be9dc
7 clang-cc 0x00000001002c1462
8 clang-cc 0x00000001002c257f
9 clang-cc 0x000000010006fdfb
10 clang-cc 0x00000001000734df
11 clang-cc 0x0000000100017268
Stack dump:
0. Program arguments: /Developer/usr/bin/../libexec/clang-cc -triple x86_64-apple-darwin10 -S -disable-free -main-file-name 1.c --relocation-model pic -pic-level=1 --disable-fp-elim --unwind-tables=1 --fmath-errno=0 -mmacosx-version-min=10.6.0 -include-pch 1.h.pch -fdiagnostics-show-option -o /var/folders/MP/MP5slYG8HRCD2v6HHtqYEE+++TI/-Tmp-/cc-jYgD5N.s -x c 1.c

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:driver'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions