File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
lib/metasploit/framework/spec/threads Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -69,11 +69,6 @@ def self.configure!
69
69
end
70
70
71
71
thread_list = Metasploit ::Framework ::Spec ::Threads ::Suite . non_debugger_thread_list
72
-
73
- thread_uuids = thread_list . map { |thread |
74
- thread [ Metasploit ::Framework ::Spec ::Threads ::Suite ::UUID_THREAD_LOCAL_VARIABLE ]
75
- } . compact
76
-
77
72
thread_count = thread_list . count
78
73
79
74
if thread_count > EXPECTED_THREAD_COUNT_AROUND_SUITE
@@ -82,10 +77,18 @@ def self.configure!
82
77
if LOG_PATHNAME . exist?
83
78
caller_by_thread_uuid = Metasploit ::Framework ::Spec ::Threads ::Suite . caller_by_thread_uuid
84
79
85
- thread_uuids . each do |thread_uuid |
80
+ thread_list . each do |thread |
81
+ thread_uuid = thread [ Metasploit ::Framework ::Spec ::Threads ::Suite ::UUID_THREAD_LOCAL_VARIABLE ]
82
+
83
+ # unmanaged thread, such as the main VM thread
84
+ unless thread_uuid
85
+ next
86
+ end
87
+
86
88
caller = caller_by_thread_uuid [ thread_uuid ]
87
89
88
- error_lines << "Thread #{ thread_uuid } \n "
90
+ error_lines << "Thread #{ thread_uuid } 's status is #{ thread . status . inspect } " \
91
+ "and was started here:\n "
89
92
90
93
error_lines . concat ( caller )
91
94
end
You can’t perform that action at this time.
0 commit comments