]> git.ozlabs.org Git - ccan/commit
coroutine: Remove problematic diagnostic from api-3 test
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 24 Jan 2017 06:59:16 +0000 (17:59 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 24 Jan 2017 10:22:27 +0000 (21:22 +1100)
commitace6131ed7d12a48fc6f019a0d69e94f30c5cd3e
tree7edcf7cee26f35ea98d017323374996dd61ef682
parent9b3f4ef6eec6a5981dcaa62f45da49b8f4f95388
coroutine: Remove problematic diagnostic from api-3 test

The api-3 testcase devotes most of its available stack space to a test
buffer, leaving only a small amount (COROUTINE_MIN_STKSZ) for the actual
stack usage of the coroutine.

It turns out that the ccan/tap diag() function can - depending on compiler
version and flags, and on whether diagnostics are enabled - exceed that
limited stack space.  That leads to a stack overrun, and in turn corruption
of the parent routine's stack, generating unpredictable and hard to debug
SEGVs.

At present, this bug seems to be tripped by clang-3.8 when diagnostic
messages are printed.

This removes the troublesome diag() call.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
ccan/coroutine/test/api-3.c