zephyr/tests/kernel/pipe/pipe_api/src
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
..
main.c tests: ztest: call test_main() without arguments 2017-08-24 09:29:14 -07:00
test_pipe_contexts.c tests/kernel/pipe: fix uninitialized semaphore 2017-11-14 09:47:19 -08:00
test_pipe_fail.c tests: pipe: fix style 2017-06-19 09:01:14 -04:00