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 651141 - hashtable infinite loop
hashtable infinite loop
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-05-26 12:22 UTC by Carlos Garnacho
Modified: 2016-06-25 11:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case (555 bytes, text/plain)
2011-05-26 12:22 UTC, Carlos Garnacho
  Details
patch (924 bytes, patch)
2011-05-26 12:23 UTC, Carlos Garnacho
none Details | Review

Description Carlos Garnacho 2011-05-26 12:22:01 UTC
Created attachment 188659 [details]
test case

Apparently, this only happens on master. if there is some destroy func and notify=TRUE, g_hash_table_remove_all_nodes() clears ht->noccupied to 0, but leaves tombstones untouched, which leads to bad accounting of nodes, and g_hash_table_lookup_node() being infinitely confused, possibly falling into endless loops due to not finding any empty/tombstone node.

I'm attaching a testcase and a patch.
Comment 1 Carlos Garnacho 2011-05-26 12:23:16 UTC
Created attachment 188661 [details] [review]
patch
Comment 2 Martyn Russell 2011-05-26 14:34:28 UTC
I tested this on the device as root and user and it seems fine:

RM696-21-2:~# aegis-su  -o blah ./foo 
Finished.RM696-21-2:~# 

~ $ aegis-su  -o blah ./foo
Finished.~ $ 

So we're not affected on the device so far.
Comment 3 Martyn Russell 2011-05-26 14:37:27 UTC
Err, my mistake, I thought this was Nokia bugzilla -ETOOMANYBUGZILLAS :)

To clarify, the version I tested with was 2.28.4-1maemo4+0m6