Comment 72 for bug 36581

Revision history for this message
In , Daniel (daniel-redhat-bugs) wrote :

Thanks a lot ! This is what I was afraid of. The gam_server is not
multithreaded anymore, so such corruption should not be the result
of unguarded reentrancy. The children list is obtained by
children = gam_tree_get_children(tree, dir_node); which does

    GList *list = NULL;
    [...]
    for (i = 0; i < g_node_n_children(node); i++) {
        list = g_list_prepend(list, NODE_DATA(g_node_nth_child(node, i)));
    }

gam_tree_get_children() cannot loop, it should return a correct list.

the loop in gam_poll_scan_directory_internal() just emits event and
should not modify the list which is built as a temporary structure,
l or related list data are not passed down to the recursive call to
gam_poll_scan_directory_internal()

I'm puzzled that we end-up with some corruption there. Reading
g_list_prepend() code I don't see how this could fail. Except running
gam_server under valgrind to try to track a random memory access
error I don't see how to chase this in a deterministic way.
Annoying, very annoying !

Daniel