diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-02-14 12:18:32 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-02-14 12:18:32 +0000 |
commit | a5b58f9b3bf81269cc930d6f2da4609a4eedbdaf (patch) | |
tree | 4f1deec95c1e35ae18431d02931b32e98f0829bc /llvm/lib/Support/Unix | |
parent | 6ad35899641880fa70cac5750c3c67574e8f82c9 (diff) | |
download | bcm5719-llvm-a5b58f9b3bf81269cc930d6f2da4609a4eedbdaf.tar.gz bcm5719-llvm-a5b58f9b3bf81269cc930d6f2da4609a4eedbdaf.zip |
Workaround an MSan false positive.
llvm-svn: 175156
Diffstat (limited to 'llvm/lib/Support/Unix')
-rw-r--r-- | llvm/lib/Support/Unix/Process.inc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Support/Unix/Process.inc b/llvm/lib/Support/Unix/Process.inc index 1335b78e86b..9a4454f1c65 100644 --- a/llvm/lib/Support/Unix/Process.inc +++ b/llvm/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 |