zephyr/tests/kernel
Andy Ross a9f0f445ba tests/kernel/pipe: fix uninitialized semaphore
The end_sema k_sem was only initialized on one of the several paths
that used it, leading to some crazy clobber-the-run-queue behavior
that was dependent on linkage order (see the linked bug) when end_sema
and the pipe object were made non-static..

Adding a k_sem_init() call fixes the corrupt issue, but really the
right thing is to use the DEFINE macro, so do that instead.  Note that
that the initializer changes the linkage order too (by putting the
semaphore in a separate segment), so... yeah, it's actually impossible
to prove that this patch in isolation resolves the issue seen without
manual validation.

Issue: https://github.com/zephyrproject-rtos/zephyr/issues/4366

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2017-11-14 09:47:19 -08:00
..
alert/alert_api kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
arm_irq_vector_table kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
arm_runtime_nmi kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
bitfield kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
common kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
context kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
critical kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
errno kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
fatal tests: fatal: convert legacy test to ztest 2017-11-13 16:35:27 -05:00
fifo/fifo_api kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
fp_sharing kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
gen_isr_table kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
irq_offload kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
libs kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
lifo/lifo_api kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
mbox/mbox_api kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
mem_heap/mheap_api_concept kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
mem_pool kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
mem_protect kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
mem_slab kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
msgq/msgq_api kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
multilib kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
mutex kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
obj_tracing kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
pending kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
pipe/pipe_api tests/kernel/pipe: fix uninitialized semaphore 2017-11-14 09:47:19 -08:00
poll kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
profiling/profiling_api kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
pthread kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
queue kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
semaphore/sema_api kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
sleep kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
sprintf kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
stack/stack_api kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
static_idt kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
systhreads kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
test_build kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
threads kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
tickless kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
timer kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
workq kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00
xip kbuild: Removed KBuild 2017-11-08 20:00:22 -05:00