lwIP - A Lightweight TCP/IP stack - Bugs: bug #35305, pcb may be freed too early on...
You are not allowed to post comments on this tracker with your current authentication level.
bug #35305: pcb may be freed too early on shutdown(WR)
Submitter: | Amir Shalem <amirshalem> | ||
Submitted: | Fri 13 Jan 2012 05:15:51 PM UTC | ||
Category: | TCP | Severity: | 3 - Normal |
Item Group: | Crash Error | Status: | Fixed |
Privacy: | Public | Assigned to: | goldsimon |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | CVS Head |
Jump to the original submission
Sun 22 Jan 2012 10:20:06 AM UTC, comment #6: |
Simon Goldschmidt <goldsimon> |
Sat 21 Jan 2012 06:06:20 PM UTC, comment #5: Updated comment to better reflect the bug (it's a bug in shutdown, not in closing). |
Simon Goldschmidt <goldsimon> |
Fri 20 Jan 2012 09:49:00 PM UTC, comment #4: I like the idea of calling TCP_EVENT_ERR with ERR_CLSD: we don't have a defined way of handling SHUT_RDWR at raw API level, yet, and it would be the best way of integrating it into the netconn/socket API. |
Simon Goldschmidt <goldsimon> |
Fri 20 Jan 2012 06:39:39 AM UTC, comment #3: Targeting at 1.4.1 since I want shutdown to be fixed there. |
Simon Goldschmidt <goldsimon> |
Sat 14 Jan 2012 07:30:43 AM UTC, comment #2: 1.
|
Amir Shalem <amirshalem> |
Fri 13 Jan 2012 07:36:32 PM UTC, comment #1: If the application called close() instead of shutdown() would this problem still be there?
|
Kieran Mansley <kieranm> |
Fri 13 Jan 2012 05:15:51 PM UTC, original submission:
Hey
|
Amir Shalem <amirshalem> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 6 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2012-01-22 | goldsimon | Open/Closed | Open | Closed | |
2012-01-22 | goldsimon | Status | In Progress | Fixed | |
2012-01-21 | goldsimon | Status | None | In Progress | |
Assigned to | None | goldsimon | |||
Summary | Too early free of TCP pcb while closing the socket | pcb may be freed too early on shutdown(WR) | |||
2012-01-20 | goldsimon | Planned Release | 1.4.1 |
Powered by Savane 3.13-caa5.
Corresponding source code
Fixed by adding "TCP_EVENT_ERR(pcb->errf, pcb->callback_arg, ERR_CLSD)" only "if (!(pcb->flags & TF_RXCLOSED))", i.e. if the application has shut down the TX side but not the RX side.