Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
4705b8a6
Commit
4705b8a6
authored
23 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Avoid crash when trying to attach to a terminating process.
parent
23d4aab2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/debugger.c
+5
-5
5 additions, 5 deletions
server/debugger.c
with
5 additions
and
5 deletions
server/debugger.c
+
5
−
5
View file @
4705b8a6
...
...
@@ -425,6 +425,7 @@ static int debugger_attach( struct process *process, struct thread *debugger )
if
(
process
->
debugger
)
goto
error
;
/* already being debugged */
if
(
process
->
init_event
)
goto
error
;
/* still starting up */
if
(
!
process
->
thread_list
)
goto
error
;
/* no thread running in the process */
/* make sure we don't create a debugging loop */
for
(
thread
=
debugger
;
thread
;
thread
=
thread
->
process
->
debugger
)
...
...
@@ -437,19 +438,18 @@ static int debugger_attach( struct process *process, struct thread *debugger )
suspend_process
(
process
);
/* we must have been able to attach all threads */
if
(
!
process
->
thread_list
)
goto
error2
;
for
(
thread
=
process
->
thread_list
;
thread
;
thread
=
thread
->
proc_next
)
{
if
(
!
thread
->
attached
)
{
resume_process
(
process
);
goto
error
;
}
if
(
!
thread
->
attached
)
goto
error2
;
}
if
(
set_process_debugger
(
process
,
debugger
))
return
1
;
resume_process
(
process
);
return
0
;
error2:
resume_process
(
process
);
error:
set_error
(
STATUS_ACCESS_DENIED
);
return
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment