[Lldb-commits] [lldb] Fix a crasher when using the public API. (PR #80508)

2024-02-06 Thread Greg Clayton via lldb-commits
https://github.com/clayborg closed https://github.com/llvm/llvm-project/pull/80508 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix a crasher when using the public API. (PR #80508)

2024-02-06 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/80508 >From c416b6f4c0a00684057947782413b66af4c197f3 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 2 Feb 2024 15:30:40 -0800 Subject: [PATCH 1/4] Fix a crasher when using the public API. A user found a crash

[Lldb-commits] [lldb] Fix a crasher when using the public API. (PR #80508)

2024-02-06 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/80508 >From c416b6f4c0a00684057947782413b66af4c197f3 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 2 Feb 2024 15:30:40 -0800 Subject: [PATCH 1/3] Fix a crasher when using the public API. A user found a crash

[Lldb-commits] [lldb] Fix a crasher when using the public API. (PR #80508)

2024-02-06 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/80508 >From c416b6f4c0a00684057947782413b66af4c197f3 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 2 Feb 2024 15:30:40 -0800 Subject: [PATCH 1/2] Fix a crasher when using the public API. A user found a crash

[Lldb-commits] [lldb] Fix a crasher when using the public API. (PR #80508)

2024-02-06 Thread Greg Clayton via lldb-commits
https://github.com/clayborg updated https://github.com/llvm/llvm-project/pull/80508 >From c416b6f4c0a00684057947782413b66af4c197f3 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 2 Feb 2024 15:30:40 -0800 Subject: [PATCH] Fix a crasher when using the public API. A user found a crash whe

[Lldb-commits] [lldb] Fix a crasher when using the public API. (PR #80508)

2024-02-06 Thread via lldb-commits
https://github.com/kusmour requested changes to this pull request. revert whitespace changes and we're good to go! https://github.com/llvm/llvm-project/pull/80508 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[Lldb-commits] [lldb] Fix a crasher when using the public API. (PR #80508)

2024-02-03 Thread via lldb-commits
@@ -1089,9 +1089,9 @@ void SBDebugger::SetSelectedTarget(SBTarget &sb_target) { Log *log = GetLog(LLDBLog::API); TargetSP target_sp(sb_target.GetSP()); - if (m_opaque_sp) { + if (m_opaque_sp && target_sp) m_opaque_sp->GetTargetList().SetSelectedTarget(target_sp); --

[Lldb-commits] [lldb] Fix a crasher when using the public API. (PR #80508)

2024-02-03 Thread via lldb-commits
https://github.com/kusmour requested changes to this pull request. probs should remove the irrelevant whitespace changes Otherwise looking good! https://github.com/llvm/llvm-project/pull/80508 ___ lldb-commits mailing list lldb-commits@lists.llvm.org h

[Lldb-commits] [lldb] Fix a crasher when using the public API. (PR #80508)

2024-02-03 Thread via lldb-commits
https://github.com/kusmour edited https://github.com/llvm/llvm-project/pull/80508 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix a crasher when using the public API. (PR #80508)

2024-02-03 Thread via lldb-commits
@@ -1089,9 +1089,9 @@ void SBDebugger::SetSelectedTarget(SBTarget &sb_target) { Log *log = GetLog(LLDBLog::API); TargetSP target_sp(sb_target.GetSP()); - if (m_opaque_sp) { + if (m_opaque_sp && target_sp) m_opaque_sp->GetTargetList().SetSelectedTarget(target_sp); -

[Lldb-commits] [lldb] Fix a crasher when using the public API. (PR #80508)

2024-02-02 Thread via lldb-commits
@@ -1089,9 +1089,9 @@ void SBDebugger::SetSelectedTarget(SBTarget &sb_target) { Log *log = GetLog(LLDBLog::API); TargetSP target_sp(sb_target.GetSP()); - if (m_opaque_sp) { + if (m_opaque_sp && target_sp) m_opaque_sp->GetTargetList().SetSelectedTarget(target_sp); --

[Lldb-commits] [lldb] Fix a crasher when using the public API. (PR #80508)

2024-02-02 Thread via lldb-commits
@@ -1089,9 +1089,9 @@ void SBDebugger::SetSelectedTarget(SBTarget &sb_target) { Log *log = GetLog(LLDBLog::API); TargetSP target_sp(sb_target.GetSP()); - if (m_opaque_sp) { + if (m_opaque_sp && target_sp) jimingham wrote: Do we also want to check target

[Lldb-commits] [lldb] Fix a crasher when using the public API. (PR #80508)

2024-02-02 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Greg Clayton (clayborg) Changes A user found a crash when they would do code like: (lldb) script >>> target = lldb.SBTarget() >>> lldb.debugger.SetSelectedTarget(target) We were not checking if the target was valid in SBDebugger::SetSelect

[Lldb-commits] [lldb] Fix a crasher when using the public API. (PR #80508)

2024-02-02 Thread Greg Clayton via lldb-commits
https://github.com/clayborg created https://github.com/llvm/llvm-project/pull/80508 A user found a crash when they would do code like: (lldb) script >>> target = lldb.SBTarget() >>> lldb.debugger.SetSelectedTarget(target) We were not checking if the target was valid in SBDebugger::SetSelectedT