[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.
Greg Clayton
gclayton at apple.com
Tue Jan 6 09:45:25 PST 2015
Yep, I am going to add one. I can't complain if there is nothing in the test suite that fails, so no worries.
> On Jan 5, 2015, at 4:47 PM, Zachary Turner <zturner at google.com> wrote:
>
> 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
More information about the lldb-commits
mailing list