buglwIP - A Lightweight TCP/IP stack - Bugs: bug #50822, tcp_state_str() compiled...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #50822: tcp_state_str() compiled independently of TCP_DEBUG, possibly increasing dead data

Submitter:  Konstantin <tomcat_84>
Submitted:  Tue 18 Apr 2017 07:18:25 AM UTC
   
 
Category:  TCP Severity:  3 - Normal
Item Group:  Feature Request Status:  Invalid
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  2.0.0

Tue 18 Apr 2017 08:46:19 AM UTC, comment #2: 

The function tcp_debug_state_str() is used from external code that does not depend on internal debug settings (e.g. http_poll()).

Simon Goldschmidt <goldsimon>
Group administrator
Tue 18 Apr 2017 07:23:06 AM UTC, comment #1: 

If your compiler is not able to throw away unused functions, you always waste a lot of memory size in your system. You never use all functions in lwIP's source files!

GCC: always use

-fdata-sections
-ffunction-sections
for compile

and
-gc-sections
for linking.

A compiler that does not provide similar functions is NOT suitable to develop for resource constrained systems.

Dirk Ziegelmeier <dziegel>
Group administrator
Tue 18 Apr 2017 07:18:25 AM UTC, original submission:  

There are many

#if TCP_DEBUG || TCP_INPUT_DEBUG || TCP_OUTPUT_DEBUG

throughout "tcp.c", but this constant above is not inside one of these. It seems to be used only by debug outputs. If compiler does not optimize it, this leads to extra space used (about 144 bytes). Making it conditionally compilable (along with tcp_debug_state_str() function) could reduce some projects size.

Konstantin <tomcat_84>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by dziegel (Posted a comment)
  • -email is unavailable- added by tomcat_84 (Submitted the item)
  •  

    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
    2017-04-18 goldsimon StatusNone Invalid
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code