<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - MemorySanitizer use-of-uninitialized-value in Archive/directory.ll"
   href="http://llvm.org/bugs/show_bug.cgi?id=16389">16389</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MemorySanitizer use-of-uninitialized-value in Archive/directory.ll
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Support Libraries
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>eugeni.stepanov@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Something in commit range 184416 - 184424 triggered a MemorySanitizer report on
Archive/directory.ll test:


WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x7fa48da88e6d in llvm::sys::fs::identify_magic(llvm::StringRef)
lib/Support/PathV2.cpp:785
    #1 0x7fa48da8cb35 in llvm::sys::fs::identify_magic(llvm::Twine const&,
llvm::sys::fs::file_magic&) lib/Support/PathV2.cpp:903
    #2 0x7fa48c90437a in llvm::Archive::addFileBefore(llvm::StringRef,
llvm::ilist_iterator<llvm::ArchiveMember>, std::string*)
tools/llvm-ar/ArchiveWriter.cpp:180
    #3 0x7fa48c899309 in doReplaceOrInsert(std::string*)
tools/llvm-ar/llvm-ar.cpp:624
    #4 0x7fa48c89bd8a in main tools/llvm-ar/llvm-ar.cpp:693
    #5 0x7fa48af2e76c (/lib/x86_64-linux-gnu/libc.so.6+0x2176c)
    #6 0x7fa48c884400 in _start (bin/llvm-ar+0x47400)
  Uninitialized value was created by an allocation of 'Magic' in the stack
frame of function 'llvm::sys::fs::identify_magic(llvm::Twine const&,
llvm::sys::fs::file_magic&)'


Code in get_magic() looks weird in several places and does not seem to be
handling empty files well.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>