[compiler-rt] 616dfa9 - Revert "[test][HWASAN] Suppress memory leak in getpass"
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 26 16:49:58 PDT 2023
Author: Vitaly Buka
Date: 2023-04-26T16:48:57-07:00
New Revision: 616dfa9863009bde313de4c657549ae752a09700
URL: https://github.com/llvm/llvm-project/commit/616dfa9863009bde313de4c657549ae752a09700
DIFF: https://github.com/llvm/llvm-project/commit/616dfa9863009bde313de4c657549ae752a09700.diff
LOG: Revert "[test][HWASAN] Suppress memory leak in getpass"
Does not fix the leak.
This reverts commit 1533478615e998192e227bded9d0e9029474936b.
Added:
Modified:
compiler-rt/test/sanitizer_common/TestCases/Posix/getpass.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/getpass.cpp b/compiler-rt/test/sanitizer_common/TestCases/Posix/getpass.cpp
index 4814bb1a9c6e..201b47a7aa27 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Posix/getpass.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/getpass.cpp
@@ -23,8 +23,6 @@
#endif
#include <unistd.h>
-char *s; // getpass leaks.
-
int main(int argc, char **argv) {
int m;
int pid = forkpty(&m, NULL, NULL, NULL);
@@ -40,7 +38,7 @@ int main(int argc, char **argv) {
while ((res = read(m, buf, sizeof(buf))) > 0)
write(1, buf, res);
} else {
- s = getpass("prompt");
+ char *s = getpass("prompt");
assert(strcmp(s, "password") == 0);
write(1, "done\n", 5);
}
More information about the llvm-commits
mailing list