zephyr/tests/net
Jukka Rissanen 7a0c52277c tests: net: ipv6: Fix reference to stack variable
Valgrind reported this:

==14823== Invalid read of size 4
==14823==    at 0x113FB9: memcpy (string_fortified.h:34)
==14823==    by 0x113FB9: ethernet_fill_header (ethernet.c:483)
==14823==    by 0x113FB9: ethernet_send (ethernet.c:588)
==14823==    by 0x116720: net_if_tx (net_if.c:173)
==14823==    by 0x116720: process_tx_packet (net_if.c:211)
==14823==    by 0x10FDB6: z_work_q_main (work_q.c:32)
==14823==    by 0x10FD55: _thread_entry (thread_entry.c:29)
==14823==    by 0x111CF7: posix_thread_starter (posix_core.c:301)
==14823==    by 0x49673BC: start_thread (pthread_create.c:463)
==14823==    by 0x4A78E15: clone (clone.S:108)
==14823==  Address 0x87822a6 is in a rw- anonymous segment

The issue is that we had a pointer that pointed to local stack
variable and that pointer was used to access stuff after the
test function had returned.

Fixes #12006

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-12-11 10:18:06 -05:00
..
6lo net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
all net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
app net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
arp net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
buf samples, tests: Use semi-accurate project names 2018-10-27 21:31:25 -04:00
checksum_offload net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
context tests: net: context: Disable assertion for net_context tests 2018-12-07 12:00:04 +02:00
dhcpv4 net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
ethernet_mgmt net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
icmpv6 net/icmpv6: Refactoring ICMPv6 input end-point 2018-12-11 15:49:45 +02:00
ieee802154 net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
iface net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
ip-addr net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
ipv6 tests: net: ipv6: Fix reference to stack variable 2018-12-11 10:18:06 -05:00
ipv6_fragment net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
lib net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
mgmt net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
mld net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
neighbor net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
net_pkt net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
promiscuous net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
ptp/clock net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
route net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
rpl net/icmpv6: Refactoring ICMPv6 input end-point 2018-12-11 15:49:45 +02:00
socket net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
tcp tests: net: tcp: Fix interface initialization 2018-12-07 12:00:04 +02:00
traffic_class net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
trickle net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
tx_timestamp net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
udp net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
utils net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
vlan net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
websocket net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00