https://bugs.llvm.org/show_bug.cgi?id=38657
Eli Friedman <efrie...@codeaurora.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|REOPENED |RESOLVED
--- Comment #8 from Eli Friedman <efrie...@codeaurora.org> ---
Yes, still a use-after-free. There are a few easy ways to verify this. One, it
crashes if you change "struct String" to allocate storage on the heap, e.g.:
struct String {
char *content;
String (const String& a) {
content = new char[1000000];
strcpy(content, a.content);
}
String (const char* a) {
content = new char[1000000];
strcpy(content, a);
}
operator const char* () const {
return content;
}
~String() { delete content; }
};
Two, if you build with -fsanitize=address, you'll get a "stack-use-after-scope"
error.
--
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