Il 18/10/2012 16:28, Peter Maydell ha scritto: > The function vnc_stop_worker_thread() is buggy, beacuse it tries to > delete jobs from the worker thread's queue but the worker thread itself > will not cope with this happening (it would end up trying to remove > an already-removed list item from its queue list). Fortunately > nobody ever calls vnc_stop_worker_thread(), so we can fix this by > simply deleting all the untested racy code.
Note that there is just one queue. The queue global == the arg argument of vnc_worker_thread == the queue argument of vnc_worker_thread_loop. So I'm not sure I follow your reasoning. So the bug may be that we never call vnc_stop_worker_thread from vnc_disconnect_finish. BTW vnc_jobs_join is called there so we could just assert that the queue is empty... Paolo > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> > --- > Seems the easiest way to deal with this bug spotted via code > inspection :-)