[llvm-bugs] [Bug 49345] New: MemorySanitizer: use-of-uninitialized-value in std::ostream::__put_character_sequence
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Feb 24 15:25:39 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49345
Bug ID: 49345
Summary: MemorySanitizer: use-of-uninitialized-value in
std::ostream::__put_character_sequence
Product: libc++
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: nok.raven at gmail.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
#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>
>(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*,
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>
>(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*)
/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>
>(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*,
unsigned long)
Exiting
> typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
> if (__s)
> ^
https://godbolt.org/z/o3f6z6
--
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/20210224/2be6ad45/attachment-0001.html>
More information about the llvm-bugs
mailing list