summaryrefslogtreecommitdiff
path: root/lib/Support/Unix
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2013-02-14 12:18:32 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2013-02-14 12:18:32 +0000
commit79e8429e41c98d42e9e4d13de8276b8de24ddc83 (patch)
tree1f09cc5960c5266ea1bd742c61df2561c3d1e885 /lib/Support/Unix
parent58842c4ba1d2e56e09861a1f680002b64927e4d1 (diff)
downloadllvm-79e8429e41c98d42e9e4d13de8276b8de24ddc83.tar.gz
llvm-79e8429e41c98d42e9e4d13de8276b8de24ddc83.tar.bz2
llvm-79e8429e41c98d42e9e4d13de8276b8de24ddc83.tar.xz
Workaround an MSan false positive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175156 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Unix')
-rw-r--r--lib/Support/Unix/Process.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Support/Unix/Process.inc b/lib/Support/Unix/Process.inc
index 1335b78e86..9a4454f1c6 100644
--- a/lib/Support/Unix/Process.inc
+++ b/lib/Support/Unix/Process.inc
@@ -224,6 +224,8 @@ static unsigned getColumns(int FileID) {
#if defined(HAVE_SYS_IOCTL_H) && defined(HAVE_TERMIOS_H)
// Try to determine the width of the terminal.
struct winsize ws;
+ // Zero-fill ws to avoid a false positive from MemorySanitizer.
+ memset(&ws, 0, sizeof(ws));
if (ioctl(FileID, TIOCGWINSZ, &ws) == 0)
Columns = ws.ws_col;
#endif