[Lldb-commits] [PATCH] Fix FileSpec::GetPath to return null-terminated strings

Ilia K ki.stfu at gmail.com
Wed Feb 11 10:29:52 PST 2015


================
Comment at: source/API/SBModule.cpp:209-210
@@ -208,4 +208,4 @@
 
 const char *
 SBModule::GetUUIDString () const
 {
----------------
zturner wrote:
> Note that this function is currently returning a pointer to stack memory, so it busted in more serious ways than you are currently addressing.  Because of that, I will suggest an alternative fix.
No. It returns a pointer to static memory. 

================
Comment at: source/Host/common/SocketAddress.cpp:35-36
@@ -34,4 +34,4 @@
 // TODO: implement shortened form "::" for runs of zeros
 const char* inet_ntop(int af, const void * src,
                       char * dst, socklen_t size)
 {
----------------
zturner wrote:
> I would prefer if this function were changed to the following signature:
> 
> bool inet_ntop(int af, const void *src, llvm::SmallVector<char> &dst);
It's a widely known POSIX function. We really want to change its prototype?

http://reviews.llvm.org/D7553

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list