diff options
| author | Vitaly Buka <vitalybuka@google.com> | 2022-07-06 18:39:52 -0700 |
|---|---|---|
| committer | Vitaly Buka <vitalybuka@google.com> | 2022-07-06 18:46:04 -0700 |
| commit | 121798fdb5561bc8e9c6a56d18a7edc7b7d2d53d (patch) | |
| tree | 558c108ec10419c2aa32dc4363d685b41910737a | |
| parent | 6052025b5813231505e0a656f13e6e04973a485e (diff) | |
| download | llvm-121798fdb5561bc8e9c6a56d18a7edc7b7d2d53d.zip llvm-121798fdb5561bc8e9c6a56d18a7edc7b7d2d53d.tar.gz llvm-121798fdb5561bc8e9c6a56d18a7edc7b7d2d53d.tar.bz2 | |
[sanitizer] Fix dn_expand test
res is not the size of expanded string.
| -rw-r--r-- | compiler-rt/test/msan/Linux/dn_expand.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler-rt/test/msan/Linux/dn_expand.cpp b/compiler-rt/test/msan/Linux/dn_expand.cpp index a7b2b37..79399bf 100644 --- a/compiler-rt/test/msan/Linux/dn_expand.cpp +++ b/compiler-rt/test/msan/Linux/dn_expand.cpp @@ -17,7 +17,8 @@ void testWrite() { sizeof(output)); assert(res >= 0); - __msan_check_mem_is_initialized(output, res); + assert(strlen(output) == 11); + __msan_check_mem_is_initialized(output, strlen(output) + 1); } void testWriteZeroLength() { @@ -31,6 +32,8 @@ void testWriteZeroLength() { sizeof(output)); assert(res >= 0); + assert(strlen(output) == 0); + __msan_check_mem_is_initialized(output, strlen(output) + 1); __msan_check_mem_is_initialized(output, res); } |
