Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Oct 2019 20:34:24 +0000
From:      bugzilla-noreply@freebsd.org
To:        toolchain@FreeBSD.org
Subject:   [Bug 241137] Base lldb 9 crashes compared to devel/llvm90
Message-ID:  <bug-241137-29464-8foam21Dlk@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-241137-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-241137-29464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241137

--- Comment #3 from commit-hook@freebsd.org ---
A commit references this bug:

Author: dim
Date: Thu Oct 10 20:33:56 UTC 2019
New revision: 353416
URL: https://svnweb.freebsd.org/changeset/base/353416

Log:
  Pull in r374444 from upstream lldb trunk (by me):

    Fix process launch failure on FreeBSD after r365761

    Summary:
    After rLLDB365761, and with `LLVM_ENABLE_ABI_BREAKING_CHECKS`
    enabled, launching any process on FreeBSD crashes lldb with:

    ```
    Expected<T> must be checked before access or destruction.
    Expected<T> value was in success state. (Note: Expected<T> values in
    success mode must still be checked prior to being destroyed).
    ```

    This is because `m_operation_thread` and `m_monitor_thread` were
    wrapped in `llvm::Expected<>`, but this requires the objects to be
    correctly initialized before accessing them.

    To fix the crashes, use `llvm::Optional<>` for the members (as
    indicated by labath), and use local variables to store the return
    values of `LaunchThread` and `StartMonitoringChildProcess`.  Then,
    only assign to the member variables after checking if the return
    values indicated success.

    Reviewers: devnexen, emaste, MaskRay, mgorny

    Reviewed By: devnexen

    Subscribers: jfb, labath, krytarowski, lldb-commits

    Differential Revision: https://reviews.llvm.org/D68723

  PR:           241137
  MFC after:    1 month
  X-MFC-With:   r353358

Changes:
=20
head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.=
cpp
  head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonito=
r.h

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241137-29464-8foam21Dlk>