Commit ace6131e authored by David Gibson's avatar David Gibson

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: default avatarDavid Gibson <david@gibson.dropbear.id.au>
parent 9b3f4ef6
......@@ -27,8 +27,6 @@ static void clobber(void *p)
buf[i] = random() & 0xff;
}
diag("Wrote random to buffer\n");
s->total = 0;
for (i = 0; i < sizeof(buf); i++) {
s->total += buf[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment