signal handler id overflow possibility
- From: "H. W. Wan" <hwwan80 gmail com>
- To: gtk-devel-list gnome org
- Subject: signal handler id overflow possibility
- Date: Sun, 17 May 2009 00:06:17 +0800
Hi list,
In glib/gobject/gsignal.c, the sequence number of signal handler is
monotonic increasing , there is no code trying to decrement the
sequence number or reusing the sequence id after the signal handler is
disconnected. It is assumed signal handler id won't be overflow ( from
looking at the first few line of handler_new() /zero is treating as
invalid id without setting handler id to 1 when it overflow back to
zero/doesn't try to check for duplicate handler id in case it overflow
and set to value which the handler_id is in used). It may be practical
impossible for GUI application which do not always do
g_signal_connect/g_signal_
disconnect repeatly. However, when gobject is
more frequently used for long running network application, overflowing
the handler id maybe possible. For example, an network server may try
to do g_signal_connect/disconnect on "connection closed" signal
everytime an client is connected/disconnect. Is there any plan to fix
this?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]