summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Perrin2012-11-22 12:13:07 (EST)
committer Eugene Tarassov2012-12-04 17:34:05 (EST)
commite6e25b82bacb27dbf5d75e10691b101abcb65d93 (patch)
treeb597d265be0deb34901430c0975380f7b46950dc
parent867a8aa85b63919f806a0db78885dfe710eedc25 (diff)
downloadorg.eclipse.tcf.agent-e6e25b82bacb27dbf5d75e10691b101abcb65d93.zip
org.eclipse.tcf.agent-e6e25b82bacb27dbf5d75e10691b101abcb65d93.tar.gz
org.eclipse.tcf.agent-e6e25b82bacb27dbf5d75e10691b101abcb65d93.tar.bz2
Fix crash when a child process exits.
When a multi-threaded child process exits, the agent crashes with an assert() in context.c, line 186. There is an issue at the context creation time about the context ref count.
-rw-r--r--agent/system/GNU/Linux/tcf/context-linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/agent/system/GNU/Linux/tcf/context-linux.c b/agent/system/GNU/Linux/tcf/context-linux.c
index 46f2d72..1d5a9f1 100644
--- a/agent/system/GNU/Linux/tcf/context-linux.c
+++ b/agent/system/GNU/Linux/tcf/context-linux.c
@@ -1207,7 +1207,7 @@ static void event_pid_stopped(pid_t pid, int signal, int event, int syscall) {
list_add_first(&prs2->ctxl, &detach_list);
break;
}
- prs2->ref_count = 0;
+ prs2->ref_count--;
link_context(prs2);
send_context_created_event(prs2);
}