[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #26405] Prematurely released semaphore causes lwip_sel
[lwip-devel] [bug #26405] Prematurely released semaphore causes lwip_select() to crash
Mon, 04 May 2009 20:02:21 +0000
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; de; rv:188.8.131.52) Gecko/2009042315 Firefox/3.0.10
Follow-up Comment #2, bug #26405 (project lwip):
Reading the code, I don't get how it could go wrong:
while the application thread calls:
i = sys_sem_wait_timeout(select_cb.sem, msectimeout);
The only problem I see here is that the port used by Konstantin could maybe
ignore the int parameter passed to sys_sem_new and always initialize the
semaphore with 1, in which case it would wait only for selectsem... but that
would make problems elswhere, too.
Anyway, since it's good practice (or at least that's what I've learnt:) to
use resources in the same order in every place, I don't have that strong an
opinion against changing the order of the sys_sem_signal calls...
Nevertheless, I'd like to understand the bug before making the change.
Reply to this item at:
Nachricht geschickt von/durch Savannah
- [lwip-devel] [bug #26405] Prematurely released semaphore causes lwip_select() to crash,
Simon Goldschmidt <=