[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] lwip_unittests crash

From: Gisle Vanem
Subject: Re: [lwip-devel] lwip_unittests crash
Date: Tue, 25 Aug 2015 15:59:03 +0200
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1

Erik Ekman wrote:

The debug messages above look strange, I didnt think there were any
loopback or igmp in the tests. How do you compile the unit tests?

By a home-brew GNU-makefile. And igmp_init() is called
from lwip_init() in test\unit\lwip_unittests.c.
Are we speaking of the same tests?

Do you include any file you made yourself? The tests are meant to run
by themselves, and they will init any netifs they need.

No, I've not included any private .c-files to the test. Only files
from git. You mean call netif_add()? There are 2 'netif structures'
under test\unit with a total of 5 calls to netif_add():

   netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, 
   netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, 
   netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, 
   netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, 

 netif_set_default(netif_add(&test_netif, &test_ipaddr, &test_netmask, ...

Can you get a backtrace from the crash? Exactly which test case is it?

Seems to crash during 'Running suite(s): UDP'.
The call-stack from WinDbg:

lwip_unittests!ip4_route(struct ip4_addr * dest = 0x00a61a44)+0x30
lwip_unittests!ip4_output(struct pbuf * p = 0x00a42c60, struct ip4_addr * src = 0x00a61a40, struct ip4_addr * dest = 0x00a61a44, unsigned char ttl = 0xff '', unsigned char tos = 0x00 '', unsigned char proto = 0x06 '')+0x41 lwip_unittests!tcp_rst(unsigned long seqno = 0x196e, unsigned long ackno = 4, struct ip4_addr * local_ip = 0x00a61a40, struct ip4_addr * remote_ip = 0x00a61a44, unsigned short local_port = 0x101, unsigned short remote_port = 0x100)+0xd6
lwip_unittests!tcp_abandon(struct tcp_pcb * pcb = <Value unavailable error>, 
int reset = 0n1)+0x13b
lwip_unittests!tcp_abort(struct tcp_pcb * pcb = 0x00a61a40)+0xb
lwip_unittests!srunner_run_teardown(struct List * fixture_list = 0x00a58ec8, 
fork_status fork_usage = CK_NOFORK (0n2))+0x56
lwip_unittests!tcase_run_tfun_nofork(struct SRunner * sr = 0x00a586a0, struct TCase * tc = 0x00a57f80, struct TF * tfun = 0x00a58f08, int i = 0n0)+0xb1
lwip_unittests!srunner_iterate_tcase_tfuns(struct SRunner * sr = 0x00a586a0, 
struct TCase * tc = 0x00a57f80)+0xdf
lwip_unittests!srunner_iterate_suites(struct SRunner * sr = 0x00a58f08, char * sname = 0x00000000 "", char * tcname = 0x00000000 "", print_output print_mode = CK_NORMAL (0n2))+0x1c2
lwip_unittests!srunner_run_all(struct SRunner * sr = 0x00a586a0, print_output 
print_mode = CK_NORMAL (0n2))+0x6f

But if it's UDP test-suite, why is tcp_abort() called?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]