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 711756 - gthreadpool: Don't pass bad data to GThreadPool sorter
gthreadpool: Don't pass bad data to GThreadPool sorter
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 711744
 
 
Reported: 2013-11-10 00:05 UTC by Stef Walter
Modified: 2013-11-11 07:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gthreadpool: Don't pass bad data to GThreadPool sorter (1.06 KB, patch)
2013-11-10 00:05 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2013-11-10 00:05:32 UTC
gthreadpool passes GUINT_TO_POINTER(1) to unused threads as a magic marker
to get them to wake up. When used with a data sorter, this causes a crash.

We shouldn't pass the magic marker through sorters, just queue it.
Comment 1 Stef Walter 2013-11-10 00:05:35 UTC
Created attachment 259389 [details] [review]
gthreadpool: Don't pass bad data to GThreadPool sorter

This causes sorters to crash.
Comment 2 Colin Walters 2013-11-10 15:07:36 UTC
Review of attachment 259389 [details] [review]:

Makes sense to me!

::: glib/gthreadpool.c
@@ +822,3 @@
+   * So here we're sending bogus data to the pool threads, which
+   * should cause them each to wake up, and check the above
+   * pool->imediate condition. However we don't want that

Minor typo, immediate.
Comment 3 Stef Walter 2013-11-11 07:00:15 UTC
Attachment 259389 [details] pushed as dce83ad - gthreadpool: Don't pass bad data to GThreadPool sorter