buglwIP - A Lightweight TCP/IP stack - Bugs: bug #50891, memory leak

 
 

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

bug #50891: memory leak

Submitter:  shen xiaomin <rhino949>
Submitted:  Fri 28 Apr 2017 09:53:41 AM UTC
   
 
Category:  DHCP Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  1.4.1

Fri 28 Apr 2017 10:36:44 AM UTC, comment #3: 

Ah, reading the text again, that could be it.

lwIP core functions (outside "api") must not be accessed from more than one thread or from thread + interrupt at the same time.

Simon Goldschmidt <goldsimon>
Group administrator
Fri 28 Apr 2017 10:31:32 AM UTC, comment #2: 

I think he is trying to say that receive processing is called from another thread while dhcp_discover is running. Clearly lwIP core interfaces must not be used from multiple threads.

Ambroz Bizjak <abizjak>
Fri 28 Apr 2017 10:14:57 AM UTC, comment #1: 

I don't understand that. Maybe you can draw a callstack to show which functions are doing what and when?

Simon Goldschmidt <goldsimon>
Group administrator
Fri 28 Apr 2017 09:53:41 AM UTC, original submission:  

first thank you for read!my english is very bad,so please forgive me.
i use dhcp like this:
netif_add(&DP83848_netif, &g_local_ip, &g_local_netmask, &g_local_gw, NULL, &ethernetif_init, &ethernet_input);
netif_set_default(&DP83848_netif);
dhcp_start(&DP83848_netif);

when dhcp_discover() send a message use(udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif)),my program jump,analysis the received frame,then analysis done,it will tranfer dhcp_handle_offer(),then tranfer dhcp_select(netif),the last tranfer will send a message,then free the memory,but the last tranfer used the same pointer(DP83848_netif.dhcp),so when the program return the dhcp_discover() to continue run,    dhcp_delete_msg() will not free the memory it alloced!

please give me a guide,how i can avoid it!thank you.


shen xiaomin <rhino949>

 

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

Attached Files
file #40524:  dhcp.c added by rhino949 (65KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    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
    2017-04-28 goldsimon StatusWorks For Me Invalid
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2017-04-28 goldsimon StatusNone Works For Me
    2017-04-28 rhino949 Attached File- Added dhcp.c, #40524
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code