|
From: Aleksander S. <A....@os...> - 2004-03-11 17:25:24
|
Hello folks, I'm using Valgrind to debug rather huge piece of software which creates and destroys dynamically a lot of semaphores. I know about se_unmap introduced in revision 1.142 of vg_libpthread.c, but it is buggy. The simplier thing is that it does not move entry in se_remap_new. But the worse thing is that there is no proper locking to avoid moving semaphore when it is used. I have tried to fix this, but after a few hours the only conclusion was to rewrite it using AVL trees, as already suggested in comment. Proper locking requires rwlocks, but they cannot be moved in memory -> so we should store in se_remap_new pointers to vg_sem_t, not entire structures. But it would make current ugly code even uglier. I'm writing this, because I want to know if anybody is working on it already. Just to avoid duplicating our work. If nobody is working on this issue, then I will implement semaphores (and maybe rwlocks too) remapping using AVL trees in a few next days. Olek. |