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

Submitted by:  Andrey Vinogradov <andreyvinogradov>
Submitted on:  Thu 03 Aug 2017 11:58:26 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: git head

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

Should be fixed.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>

 

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 andreyvinogradov (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 12 Sep 2017 07:52:38 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1