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 !
Thanks a lot ! This is what I was afraid of. The gam_server is not get_children( tree, dir_node); which does
multithreaded anymore, so such corruption should not be the result
of unguarded reentrancy. The children list is obtained by
children = gam_tree_
GList *list = NULL; n_children( node); i++) { prepend( list, NODE_DATA( g_node_ nth_child( node, i)));
[...]
for (i = 0; i < g_node_
list = g_list_
}
gam_tree_ get_children( ) cannot loop, it should return a correct list.
the loop in gam_poll_ scan_directory_ internal( ) just emits event and scan_directory_ internal( )
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_
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