<html>
<head>
<base href="https://bugs.llvm.org/">
</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 std::ostream::__put_character_sequence"
href="https://bugs.llvm.org/show_bug.cgi?id=49345">49345</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>MemorySanitizer: use-of-uninitialized-value in std::ostream::__put_character_sequence
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</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>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nok.raven@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>#include <iostream>
int main() {
std::cout << "hmm";
}
$ clang++ z.cpp -g -stdlib=libc++ -fsanitize=memory && ./a.out
==3636==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x499fd4 in std::__1::basic_ostream<char, std::__1::char_traits<char> >&
std::__1::__put_character_sequence<char, std::__1::char_traits<char>
<span class="quote">>(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*,</span >
unsigned long) /usr/lib/llvm-11/bin/../include/c++/v1/ostream:727:13
#1 0x499eb6 in std::__1::basic_ostream<char, std::__1::char_traits<char> >&
std::__1::operator<<<std::__1::char_traits<char>
<span class="quote">>(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*)</span >
/usr/lib/llvm-11/bin/../include/c++/v1/ostream:869:12
#2 0x499db6 in main /home/user/z.cpp:4:14
#3 0x7f3924d89cb1 in __libc_start_main csu/../csu/libc-start.c:314:16
#4 0x41d32d in _start (/home/user/a.out+0x41d32d)
SUMMARY: MemorySanitizer: use-of-uninitialized-value
/usr/lib/llvm-11/bin/../include/c++/v1/ostream:727:13 in
std::__1::basic_ostream<char, std::__1::char_traits<char> >&
std::__1::__put_character_sequence<char, std::__1::char_traits<char>
<span class="quote">>(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*,</span >
unsigned long)
Exiting
<span class="quote">> typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
> if (__s)
> ^</span >
<a href="https://godbolt.org/z/o3f6z6">https://godbolt.org/z/o3f6z6</a></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>