[Lldb-commits] [PATCH] D91012: [llvm] [Support] Fix segv if argv0 is null in getMainExecutable()

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 9 02:37:14 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGfce8e758892f: [lldb] [Host/freebsd] Set Arg0 for 'platform process list -v' (authored by mgorny).
Herald added a project: LLDB.

Changed prior to commit:
  https://reviews.llvm.org/D91012?vs=303666&id=303798#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91012/new/

https://reviews.llvm.org/D91012

Files:
  lldb/source/Host/freebsd/Host.cpp
  lldb/test/API/commands/platform/process/list/TestProcessList.py


Index: lldb/test/API/commands/platform/process/list/TestProcessList.py
===================================================================
--- lldb/test/API/commands/platform/process/list/TestProcessList.py
+++ lldb/test/API/commands/platform/process/list/TestProcessList.py
@@ -19,7 +19,6 @@
 
     @skipIfWindows  # https://bugs.llvm.org/show_bug.cgi?id=43702
     @skipIfRemote   # rdar://problem/66542336
-    @expectedFailureAll(oslist=['freebsd'])
     def test_process_list_with_args(self):
         """Test process list show process args"""
         self.build()
Index: lldb/source/Host/freebsd/Host.cpp
===================================================================
--- lldb/source/Host/freebsd/Host.cpp
+++ lldb/source/Host/freebsd/Host.cpp
@@ -83,6 +83,7 @@
                     match_info_ptr->GetProcessInfo().GetName())))
     return false;
 
+  process_info.SetArg0(cstr);
   Args &proc_args = process_info.GetArguments();
   while (1) {
     const uint8_t *p = data.PeekData(offset, 1);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91012.303798.patch
Type: text/x-patch
Size: 1008 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201109/e526fc10/attachment.bin>


More information about the lldb-commits mailing list