[Lldb-commits] [lldb] r225224 - Fix being able to get a thread result when calling HostThreadPosix::Join(). It was broken when initially checked in by getting the thread result into a temporary variable and never doing anything with it. Most threads in LLDB don't look at their thread results, but launching processes in a terminal window on MacOSX does require getting a thread result and this broke "process launch --tty" on darwin.

Zachary Turner zturner at google.com
Mon Jan 5 16:47:55 PST 2015


Sorry about the bug, but thanks for the fix. Does this mean there is no
test covering launching in a tty? Maybe we need one?
On Mon, Jan 5, 2015 at 4:23 PM Greg Clayton <gclayton at apple.com> wrote:

> Author: gclayton
> Date: Mon Jan  5 18:21:29 2015
> New Revision: 225224
>
> URL: http://llvm.org/viewvc/llvm-project?rev=225224&view=rev
> Log:
> Fix being able to get a thread result when calling
> HostThreadPosix::Join(). It was broken when initially checked in by getting
> the thread result into a temporary variable and never doing anything with
> it. Most threads in LLDB don't look at their thread results, but launching
> processes in a terminal window on MacOSX does require getting a thread
> result and this broke "process launch --tty" on darwin.
>
> <rdar://problem/19308966>
>
> Modified:
>     lldb/trunk/source/Host/posix/HostThreadPosix.cpp
>
> Modified: lldb/trunk/source/Host/posix/HostThreadPosix.cpp
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/
> Host/posix/HostThreadPosix.cpp?rev=225224&r1=225223&r2=225224&view=diff
> ============================================================
> ==================
> --- lldb/trunk/source/Host/posix/HostThreadPosix.cpp (original)
> +++ lldb/trunk/source/Host/posix/HostThreadPosix.cpp Mon Jan  5 18:21:29
> 2015
> @@ -35,12 +35,15 @@ HostThreadPosix::Join(lldb::thread_resul
>      Error error;
>      if (IsJoinable())
>      {
> -        lldb::thread_result_t thread_result;
> -        int err = ::pthread_join(m_thread, &thread_result);
> +        int err = ::pthread_join(m_thread, result);
>          error.SetError(err, lldb::eErrorTypePOSIX);
>      }
>      else
> +    {
> +        if (result)
> +            *result = NULL;
>          error.SetError(EINVAL, eErrorTypePOSIX);
> +    }
>
>      Reset();
>      return error;
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150106/1943ad7b/attachment.html>


More information about the lldb-commits mailing list