[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #26405] Prematurely released semaphore causes lwip_sel

From: Simon Goldschmidt
Subject: [lwip-devel] [bug #26405] Prematurely released semaphore causes lwip_select() to crash
Date: Mon, 04 May 2009 20:02:21 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; de; rv: 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:

tcpip_thread calls:
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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]