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 53071 - mainloop-test broken
mainloop-test broken
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
1.3.x
Other other
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2001-04-10 20:02 UTC by Dan Winship
Modified: 2011-02-18 15:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dan Winship 2001-04-10 20:02:30 UTC
The mainloop test has one definite problem and one maybe problem.

The definite problem is that given suitably unfair thread scheduling,
the first crawler could run before any adder and cause a crash by
calling "g_random_int_range (0, context_array->len)" when
context_array->len is 0. (This happens maybe every 10th time I try to
run it on Darwin.)

The maybe problem is that on Darwin, it always crashes in g_source_destroy
inside remove_crawler after a while, apparently destroying an already-
destroyed source. (I don't know for sure that this is really the test
program or glib's fault though, as opposed to maybe a Darwin pthreads
bug.)
Comment 1 Owen Taylor 2001-04-17 14:45:51 UTC
Checking in a fix to the definite problem. However, I also
see the crashes (occasionally); they aren't darwin-specific.

Debugging them is not proving easy, and is providing a
demonstration that test cases of the nature of "write something 
really complicated and see if it works" have drawbacks.
Comment 2 Owen Taylor 2001-11-02 03:00:02 UTC
Just checked in some fixes to CVS for mainloop-test race condition
and another bug in mainloop-test that seems to fix the problem for me.
(Fingers crossed.) The problem with the sources is that a crawler
could run and destroy itself before it was added to the crawler
array.