diff options
Diffstat (limited to 'clang/test/Modules/outofdate-rebuild.m')
-rw-r--r-- | clang/test/Modules/outofdate-rebuild.m | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Modules/outofdate-rebuild.m b/clang/test/Modules/outofdate-rebuild.m new file mode 100644 index 00000000000..510325f62dc --- /dev/null +++ b/clang/test/Modules/outofdate-rebuild.m @@ -0,0 +1,15 @@ +// RUN: rm -rf %t.cache +// RUN: echo "@import CoreText;" > %t.m +// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t.cache \ +// RUN: -fmodules -fimplicit-module-maps -I%S/Inputs/outofdate-rebuild %s \ +// RUN: -fsyntax-only +// RUN: %clang_cc1 -DMISMATCH -Werror -fdisable-module-hash \ +// RUN: -fmodules-cache-path=%t.cache -fmodules -fimplicit-module-maps \ +// RUN: -I%S/Inputs/outofdate-rebuild %t.m -fsyntax-only +// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t.cache \ +// RUN: -fmodules -fimplicit-module-maps -I%S/Inputs/outofdate-rebuild %s \ +// RUN: -fsyntax-only + +// This testcase reproduces a use-after-free in when ModuleManager removes an +// entry from the PCMCache without notifying its parent ASTReader. +@import Cocoa; |