buglwIP - A Lightweight TCP/IP stack - Bugs: bug #51652, Unit test errors appear

 
 

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

bug #51652: Unit test errors appear

Submitter:  Andrey Vinogradov <andreyvinogradov>
Submitted:  Thu 03 Aug 2017 11:58:26 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Tue 12 Sep 2017 07:52:38 PM UTC, comment #4: 

Should be fixed.

Simon Goldschmidt <goldsimon>
Group administrator
Wed 09 Aug 2017 09:34:20 AM UTC, comment #3: 

Hi!
Sorry, kinda busy at work. Need some time to get into your unit tests. Have no experience with it.
And I have no linux VM with setup for project compilation and debug (only travis). If you have one or setup manual, I'd appreciate it. I shall try to make it today or on vacation.

Andrey Vinogradov <andreyvinogradov>
Tue 08 Aug 2017 09:17:58 PM UTC, comment #2: 

Ping?

Simon Goldschmidt <goldsimon>
Group administrator
Fri 04 Aug 2017 05:08:25 AM UTC, comment #1: 

The first issue should be fixed.

Could you suggest a fix for the second issue? We're having a hard time figuring out what the problem is and why other ip address conversion/check macros aren't affected...

Simon Goldschmidt <goldsimon>
Group administrator
Thu 03 Aug 2017 11:58:26 PM UTC, original submission:  

I was playing with yarricks travis-ci and got unit test errors:
first:

compiler gcc-5:
https://travis-ci.org/Kira-sempai/lwip-merged/jobs/260786636

gcc-5 -DLWIP_NOASSERT_ON_ERROR -I/usr/include/check -I../../../../lwip/src/../test/unit -g -Wall -DLWIP_DEBUG -pedantic -Werror -Wparentheses -Wsequence-point -Wswitch-default -Wextra -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wc++-compat -Wwrite-strings -Wold-style-definition -Wcast-align -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Wunreachable-code -Wuninitialized -Wlogical-op -I. -I../../.. -I../../../../lwip/src/include -I../../../ports/unix/port/include -o lwip_unittests lwip_unittests.o test_sockets.o sys_arch.o test_mem.o test_pbuf.o test_dhcp.o test_etharp.o test_ip4.o test_mdns.o test_mqtt.o tcp_helper.o test_tcp_oos.o test_tcp.o test_udp.o  -Wl,--start-group liblwipcommon.a liblwipapps.a -pthread -lutil -lrt -lcheck -lm -lsubunit -Wl,--end-group
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcheck.a(check_run.o): In function `srunner_run':
(.text+0x965): undefined reference to `timer_create'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcheck.a(check_run.o): In function `srunner_run':
(.text+0x9b3): undefined reference to `timer_settime'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcheck.a(check_run.o): In function `srunner_run':
(.text+0x9d9): undefined reference to `timer_delete'

Solution:
contrib/unix/check/Makefile, line 42:
LDFLAGS:= -lcheck -lm -lsubunit $(LDFLAGS)

changing link position helps. Same problem was described here:
https://codedump.io/share/twca8C3P7mq9/1/undefined-reference-to-a-function-in-another-library

second:
compiler clang-3.8
runtime errors:
https://travis-ci.org/Kira-sempai/lwip-merged/jobs/260820629

 ETHARP
../../../../lwip/src/core/tcp.c:2063:10: runtime error: member access within null pointer of type 'const ip_addr_t' (aka 'const struct ip_addr')
SUMMARY: AddressSanitizer: undefined-behavior ../../../../lwip/src/core/tcp.c:2063:10 in
../../../../lwip/src/core/tcp.c:2063:10: runtime error: member access within null pointer of type 'const union (anonymous union at ../../../../lwip/src/include/lwip/ip_addr.h:70:3)'
SUMMARY: AddressSanitizer: undefined-behavior ../../../../lwip/src/core/tcp.c:2063:10 in
../../../../lwip/src/core/udp.c:1211:36: runtime error: member access within null pointer of type 'const ip_addr_t' (aka 'const struct ip_addr')
SUMMARY: AddressSanitizer: undefined-behavior ../../../../lwip/src/core/udp.c:1211:36 in
../../../../lwip/src/core/udp.c:1211:36: runtime error: member access within null pointer of type 'const union (anonymous union at ../../../../lwip/src/include/lwip/ip_addr.h:70:3)'
SUMMARY: AddressSanitizer: undefined-behavior ../../../../lwip/src/core/udp.c:1211:36 in


Andrey Vinogradov <andreyvinogradov>

 

(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 andreyvinogradov (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-09-12 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code