[all-commits] [llvm/llvm-project] 98f2eb: Fix StartDebuggingRequestHandler/ReplModeRequestHa...

jeffreytan81 via All-commits all-commits at lists.llvm.org
Mon Aug 19 15:12:12 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 98f2eb7ddab0cadd1eb6e631458ae8406f7d39a1
      https://github.com/llvm/llvm-project/commit/98f2eb7ddab0cadd1eb6e631458ae8406f7d39a1
  Author: jeffreytan81 <jeffreytan at meta.com>
  Date:   2024-08-19 (Mon, 19 Aug 2024)

  Changed paths:
    M lldb/tools/lldb-dap/DAP.h
    M lldb/tools/lldb-dap/lldb-dap.cpp

  Log Message:
  -----------
  Fix StartDebuggingRequestHandler/ReplModeRequestHandler in lldb-dap (#104824)

`SBCommand::AddCommand()` requires `SBCommandPluginInterface` to be heap
based because it will be stored inside
`std::shared_ptr<lldb::SBCommandPluginInterface>` later for reference
counting. But lldb-dap passes
`StartDebuggingRequestHandler/ReplModeRequestHandler` static function
pointer to it which will cause corruption later during destruction.

This PR fixes this issue by making these two handler heap based.

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