https://bugs.llvm.org/show_bug.cgi?id=35285
Bug ID: 35285
Summary: Address Sanitizer cannot catch using dangling pointer
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: vla...@yandex-team.ru
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
===
#include <string>
#include <string_view>
#include <iostream>
std::string foo() {
return "test";
}
int main() {
std::string_view bar = foo(); // <-- here bar is pointed to already
destructed string
std::cout << bar << std::endl;
}
===
Address sanitizer cannot catch this bug.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs