diff options
| author | Ted Kremenek <kremenek@apple.com> | 2009-10-30 05:48:30 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2009-10-30 05:48:30 +0000 |
| commit | e96a30a5314ae9c206957a35217395bd0649963c (patch) | |
| tree | 584e11b0e4ef079f6dde72bb50cf14d7d6bde359 /clang/test/Analysis/misc-ps-region-store.m | |
| parent | 1cf0b03064fb60a8250b9a8030455c600bd7503d (diff) | |
| download | bcm5719-llvm-e96a30a5314ae9c206957a35217395bd0649963c.tar.gz bcm5719-llvm-e96a30a5314ae9c206957a35217395bd0649963c.zip | |
Handle loading of field values from LazyCompoundVals in GRExprEngine::VisitMemberExpr().
This fixes the crash reported in PR 5316.
llvm-svn: 85578
Diffstat (limited to 'clang/test/Analysis/misc-ps-region-store.m')
| -rw-r--r-- | clang/test/Analysis/misc-ps-region-store.m | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/Analysis/misc-ps-region-store.m b/clang/test/Analysis/misc-ps-region-store.m index 5bba63a3a21..4cde7726b49 100644 --- a/clang/test/Analysis/misc-ps-region-store.m +++ b/clang/test/Analysis/misc-ps-region-store.m @@ -415,3 +415,19 @@ int rdar7347252(rdar7347252_SSL1 *s) { } return 0; } + +//===----------------------------------------------------------------------===// +// PR 5316 - "crash when accessing field of lazy compound value" +// Previously this caused a crash at the MemberExpr '.chr' when loading +// a field value from a LazyCompoundVal +//===----------------------------------------------------------------------===// + +typedef unsigned int pr5316_wint_t; +typedef pr5316_wint_t pr5316_REFRESH_CHAR; +typedef struct { + pr5316_REFRESH_CHAR chr; +} +pr5316_REFRESH_ELEMENT; +static void pr5316(pr5316_REFRESH_ELEMENT *dst, const pr5316_REFRESH_ELEMENT *src) { + while ((*dst++ = *src++).chr != L'\0') ; +} |

