lwIP - A Lightweight TCP/IP stack - Patches: patch #7737, Initialize all global variables to...
You are not allowed to post comments on this tracker with your current authentication level.
patch #7737: Initialize all global variables to 0 or NULL.
Submitter: | Bostjan Meglic <bostjanm> | ||
Submitted: | Wed 07 Mar 2012 09:38:48 AM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Wont Do | Privacy: | Public |
Assigned to: | None | Open/Closed: | Closed |
Planned Release: | None |
Wed 07 Mar 2012 10:44:52 AM UTC, comment #1: |
Simon Goldschmidt <goldsimon> |
Wed 07 Mar 2012 09:38:48 AM UTC, original submission:
|
Bostjan Meglic <bostjanm> |
Attached Files
file #25283: 0001-Initialize-all-global-variables-to-0-or-NULL.patch added by bostjanm (25KiB - application/octet-stream)
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
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 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2012-03-07 | goldsimon | Status | None | Wont Do | |
Open/Closed | Open | Closed | |||
2012-03-07 | bostjanm | Attached File | - | Added 0001-Initialize-all-global-variables-to-0-or-NULL.patch, #25283 |
Powered by Savane 3.13-caa5.
Corresponding source code
We've had this before, and voted against doing so as from the C standard, variables with static storage have to be initialized to 0 or NULL by the C startup code. If you have problems with this, you're either reinitializing lwIP or have a C compiler/runtime that doesn't conform to the standard.
See also this thread from lwip-users (be sure to read the whole thread):
https://lists.gnu.org/archive/html/lwip-users/2010-11/msg00024.html
If that doesn't help you, it might help to put all global lwIP variables (you might want to leave out the heap and the pools) into a dedicated section and zero that whole section in your own startup code.