buglwIP - A Lightweight TCP/IP stack - Bugs: bug #59946, lwip_select: errno not set...

 
 

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

bug #59946: lwip_select: errno not set properly on error

Submitter:  yuanjianmin <yuanjm>
Submitted:  Tue 26 Jan 2021 11:05:32 AM UTC
   
 
Category:  sockets/netconn Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  2.1.1

Thu 28 Jan 2021 08:01:42 PM UTC, comment #3: 

Fixed, thanks for reporting.

Simon Goldschmidt <goldsimon>
Group administrator
Thu 28 Jan 2021 07:53:12 PM UTC, comment #2: 

Thanks for the bug report. However, I'm not sure your patch is correct. You say 'errno' handling is missing but instead of just adding errno handling, you change the code flow?

If these changes should be required for anything, please open another bug.

I'll just fix this by adding set_errno() where missing.

Simon Goldschmidt <goldsimon>
Group administrator
Thu 28 Jan 2021 02:42:20 AM UTC, comment #1: 

I have commit a patch to fix it. PTAL.
Thanks
yuanjm

yuanjianmin <yuanjm>
Tue 26 Jan 2021 11:05:32 AM UTC, original submission:  

Hi,
  i meet a problem about errno could not setted properly in lwip_select. I found that originially lwip_selscan() only returned values >=0 and only since this bugfix commit(https://git.savannah.nongnu.org/cgit/lwip.git/commit/?id=3107d4a0fa95f93b55998bcccff1b3c66d959329) it is possible that it returns -1. But this commit maybe not exactly correct. In following two line code, https://git.savannah.nongnu.org/cgit/lwip.git/tree/src/api/sockets.c#n2113 and https://git.savannah.nongnu.org/cgit/lwip.git/tree/src/api/sockets.c#n2186, it did not handle the case of returning -1. Maybe the possibility of -1 is relatively low, but from the code logic, do we need to consider.
Thanks
yuanjm

yuanjianmin <yuanjm>

 

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

Attached Files

 

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 yuanjm (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-01-28 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2021-01-28 yuanjm Attached File- Added 0001-lwip_selscan-lwip_selscan-return-1-without-setting-e.patch, #50796

    Back to the top

    Powered by Savane 3.13-aa77.
    Corresponding source code