zephyr/tests
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
..
application_development crc: deprecate old headers and issue warning when used 2018-12-04 08:52:46 -06:00
benchmarks tests: benchmarks: timing_info: Remove common variables 2018-12-07 10:32:41 -05:00
bluetooth tests: bsim_bt tests: Fix malformed JUNIT results file 2018-12-06 09:15:38 -05:00
boards tests: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
booting/stub samples, tests: Use semi-accurate project names 2018-10-27 21:31:25 -04:00
cmsis_rtos_v1 tests: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
compliance
crypto tests: crypto: tinycrypt: Limit to boards with more than 128K flash 2018-12-11 08:43:21 -05:00
drivers sensors: convert lis2mdl to use information coming from dts 2018-12-11 08:11:11 -06:00
include tests: shell: migrate tests to the new shell 2018-11-22 11:32:29 +01:00
kernel tests: mem_pool_api: reduce stack usage 2018-12-07 20:09:47 -05:00
lib samples, tests: Use semi-accurate project names 2018-10-27 21:31:25 -04:00
misc/test_build samples, tests: Use semi-accurate project names 2018-10-27 21:31:25 -04:00
net tests: net: ipv6: Fix reference to stack variable 2018-12-11 10:18:06 -05:00
posix tests: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
power tests: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
shell shell: creating new module for help functionality 2018-12-05 15:15:44 +01:00
subsys tests: subsys: settings: tests value get len API 2018-12-11 11:22:16 +01:00
unit test: unittest: run for 32bit architecture 2018-11-22 11:32:29 +01:00
ztest tests: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
CMakeLists.txt tests: add CONFIG_TEST for marking tests 2018-01-08 10:03:57 -05:00
Kconfig tests: add Kconfig for testing via shell 2018-11-05 09:32:38 -05:00