[llvm-bugs] [Bug 32249] PVS-Studio: Use of Uninitialized Variable (CWE-457)

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 16 11:31:41 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32249

Zachary Turner <zturner at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Zachary Turner <zturner at google.com> ---
The patch looks fine, but I think I can make it a bit more concise.  We should
be able to replace this entire else block with just 

StringRef N(Name);
N = N.take_front(BytesLeft-1);
error(IO.mapStringZ(N));

I looked into why this wasn't caught by msan, and it's because this is a
hard-to-encounter edge case that doesn't have test coverage.  I've been
improving the testability of this code for a while now, so we should be at the
point fairly soon where I can get test coverage for these weird edge cases.

I'm going to close this as fixed and submit the patch shortly.  Thanks
Svyatoslav!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170316/4b7a153b/attachment.html>


More information about the llvm-bugs mailing list