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

Submitted by:  Konstantin <tomcat_84>
Submitted on:  Tue 18 Apr 2017 07:18:25 AM UTC  
 
Category: TCPSeverity: 3 - Normal
Item Group: Feature RequestStatus: Invalid
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned 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>
Project AdministratorIn charge of this item.
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>
Project Member
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 18 Apr 2017 08:46:19 AM UTCgoldsimonStatusNone=>Invalid
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1