Re: [patch] Accessing freed memory crash

2006-08-13 Thread Mikulas Patocka
Hello Mikulas, On Sat, 2006-08-12 at 03:35 +0200, Mikulas Patocka wrote: I think the code you committed is wrong. Imagine this: you have one event in select list and that event is set in select_set. On the first pass, you call callback and set retry to TRUE. Callback removes the event. You

Re: [patch] Accessing freed memory crash

2006-08-12 Thread Mikulas Patocka
On Sat, 12 Aug 2006, Leonard den Ottolander wrote: Hello Mikulas, On Fri, 2006-08-11 at 01:49 +0200, Mikulas Patocka wrote: check_selects calls a callback when there is an event on handle. The callback itself can remove the event with delete_select_channel --- when it happens,

Re: [patch] Accessing freed memory crash

2006-08-12 Thread Leonard den Ottolander
Hi Mikulas, On Sat, 2006-08-12 at 20:02 +0200, Mikulas Patocka wrote: (btw. else retry = FALSE is useless in current code, but it doesn't hurt). I realized that after I did the commit. I still intend to take it out but wanted to get your reaction first in case other changes were still

[patch] Accessing freed memory crash

2006-08-11 Thread Mikulas Patocka
Hi check_selects calls a callback when there is an event on handle. The callback itself can remove the event with delete_select_channel --- when it happens, check_selects accesses defunct p-next pointer and crash may happen. (I reproduced crash on this when inserting sleep(1) somewhere in

Re: [patch] Accessing freed memory crash

2006-08-11 Thread Leonard den Ottolander
Hello Mikulas, On Fri, 2006-08-11 at 01:49 +0200, Mikulas Patocka wrote: check_selects calls a callback when there is an event on handle. The callback itself can remove the event with delete_select_channel --- when it happens, check_selects accesses defunct p-next pointer and crash may