* [PATCH] gdbserver/win32: fix crash on detach
@ 2023-12-06 0:42 Stefano Moioli
2023-12-07 16:36 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Stefano Moioli @ 2023-12-06 0:42 UTC (permalink / raw)
To: gdb-patches; +Cc: Stefano Moioli
this patch fixes a crash in gdbserver whenever a process is detached.
the crash is caused by `detach` calling `remove_process` before `win32_clear_inferiors`
error message:
Detaching from process 184
../../gdbserver/inferiors.cc:160: A problem internal to GDBserver has been detec
ted.
remove_process: Assertion `find_thread_process (process) == NULL' failed.
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
---
gdbserver/win32-low.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc
index 3246957ec44..0ddf60c836f 100644
--- a/gdbserver/win32-low.cc
+++ b/gdbserver/win32-low.cc
@@ -735,9 +735,9 @@ win32_process_target::detach (process_info *process)
return -1;
DebugSetProcessKillOnExit (FALSE);
+ win32_clear_inferiors ();
remove_process (process);
- win32_clear_inferiors ();
return 0;
}
--
2.42.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gdbserver/win32: fix crash on detach
2023-12-06 0:42 [PATCH] gdbserver/win32: fix crash on detach Stefano Moioli
@ 2023-12-07 16:36 ` Tom Tromey
2023-12-12 20:19 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2023-12-07 16:36 UTC (permalink / raw)
To: Stefano Moioli; +Cc: gdb-patches
>>>>> "Stefano" == Stefano Moioli <smxdev4@gmail.com> writes:
Stefano> this patch fixes a crash in gdbserver whenever a process is detached.
Stefano> the crash is caused by `detach` calling `remove_process` before `win32_clear_inferiors`
Thank you for the patch. This looks good to me.
Approved-By: Tom Tromey <tom@tromey.com>
If you aren't able to push it, let me know and I will do it.
If you plan to do more work on gdb, we should probably get you started
on the copyright assignment work. Let me know.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gdbserver/win32: fix crash on detach
2023-12-07 16:36 ` Tom Tromey
@ 2023-12-12 20:19 ` Tom Tromey
2023-12-13 23:57 ` smxdev4
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2023-12-12 20:19 UTC (permalink / raw)
To: Tom Tromey; +Cc: Stefano Moioli, gdb-patches
>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
Tom> If you aren't able to push it, let me know and I will do it.
I didn't hear back, so I'm pushing this now.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] gdbserver/win32: fix crash on detach
2023-12-12 20:19 ` Tom Tromey
@ 2023-12-13 23:57 ` smxdev4
0 siblings, 0 replies; 4+ messages in thread
From: smxdev4 @ 2023-12-13 23:57 UTC (permalink / raw)
To: 'Tom Tromey'; +Cc: gdb-patches
Sorry for the late reply, and thanks for pushing it, as I'm not able to push
directly to the gdb repository.
Regards
Stefano
-----Original Message-----
From: Tom Tromey <tom@tromey.com>
Sent: martedì 12 dicembre 2023 21:20
To: Tom Tromey <tom@tromey.com>
Cc: Stefano Moioli <smxdev4@gmail.com>; gdb-patches@sourceware.org
Subject: Re: [PATCH] gdbserver/win32: fix crash on detach
>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
Tom> If you aren't able to push it, let me know and I will do it.
I didn't hear back, so I'm pushing this now.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-13 23:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-06 0:42 [PATCH] gdbserver/win32: fix crash on detach Stefano Moioli
2023-12-07 16:36 ` Tom Tromey
2023-12-12 20:19 ` Tom Tromey
2023-12-13 23:57 ` smxdev4
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).