[Pkg-openldap-devel] Bug#866122: slapd-mtread crash on ppc64{, el} in stretch/sid
Ryan Tandy
ryan at nardis.ca
Sat Jul 8 18:15:48 UTC 2017
I spent some more time on this issue and I believe I isolated the
problem to the following line:
int r = ((double)nvalues)*rand()/(RAND_MAX + 1.0);
http://sources.debian.net/src/openldap/2.4.44%2Bdfsg-7/tests/progs/slapd-mtread.c/#L682
Specifically, during the multi-threaded tests, casting 'nvalues' from
int to double occasionally comes up with the wrong result.
e.g.:
(double)19 -> 61.000000
Note that 'nvalues' is a local variable in the same function. There
should be zero chance of it being shared with another thread or anything
like that.
The bug reproduces consistently when building with stretch's toolchain
and running stretch's kernel, but I have not seen it at all with
jessie's kernel *nor* in a jessie chroot on stretch's kernel. I have
also reproduced it with clang as well as gcc.
More information about the Pkg-openldap-devel
mailing list