[all-commits] [llvm/llvm-project] 128ef9: Fix ASAN failure in TestSingleThreadStepTimeout.py...

jeffreytan81 via All-commits all-commits at lists.llvm.org
Tue Aug 6 18:09:20 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 128ef9eb533afd00da2d3d2cfeab16de6abf2640
      https://github.com/llvm/llvm-project/commit/128ef9eb533afd00da2d3d2cfeab16de6abf2640
  Author: jeffreytan81 <jeffreytan at meta.com>
  Date:   2024-08-06 (Tue, 06 Aug 2024)

  Changed paths:
    M lldb/include/lldb/Target/ThreadPlanSingleThreadTimeout.h
    M lldb/include/lldb/Target/TimeoutResumeAll.h
    M lldb/source/Target/ThreadPlanSingleThreadTimeout.cpp

  Log Message:
  -----------
  Fix ASAN failure in TestSingleThreadStepTimeout.py (#102208)

This PR fixes the ASAN failure in
https://github.com/llvm/llvm-project/pull/90930.

The original PR made the assumption that parent
`ThreadPlanStepOverRange`'s lifetime will always be longer than
`ThreadPlanSingleThreadTimeout` leaf plan so it passes the
`m_timeout_info` as reference to it.
>From the ASAN failure, it seems that this assumption may not be true
(likely the thread stack is holding a strong reference to the leaf
plan).

This PR fixes this lifetime issue by using shared pointer instead of
passing by reference.

---------

Co-authored-by: jeffreytan81 <jeffreytan at fb.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list