After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 642052 - g_timeout_add(_seconds) cannot handle large intervals
g_timeout_add(_seconds) cannot handle large intervals
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-02-10 18:26 UTC by Max Prohorov
Modified: 2011-02-15 04:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Max Prohorov 2011-02-10 18:26:48 UTC
Fine on same system with glib-2.26.1

To be more precise, interval value cannot exceed 21475 seconds
e.g. g_timeout_add_seconds(21475, function) runs every second.
And so on any interval x * 21475.

This breaks syslog-ng as described here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=606618
Comment 1 Allison Karlitskaya (desrt) 2011-02-14 19:41:01 UTC
Almost certainly my fault.
Comment 2 Allison Karlitskaya (desrt) 2011-02-15 04:24:01 UTC
commit c2fbef4125977d0c1aa1a9859491e694c9c71b05
Author: Ryan Lortie <desrt@desrt.ca>
Date:   Mon Feb 14 23:21:14 2011 -0500

    Bug 642052 - g_timeout_add(_seconds) overflow
    
    Fix integer overflow error.

commit 10154d21f012ae4fc3d94cbdbb12ed32df4837ce
Author: Ryan Lortie <desrt@desrt.ca>
Date:   Mon Feb 14 23:20:38 2011 -0500

    Bug 642052: add currently-broken test case
    
    The test case fails for now.  It will be fixed by the next commit.