2017-10-10 22:09 GMT+02:00 Eli Zaretskii <eliz@gnu.org>:
> From: Fabrice Popineau <fabrice.popineau@gmail.com>
> Date: Tue, 10 Oct 2017 21:58:35 +0200
> Cc: Emacs developers <emacs-devel@gnu.org>
>
>  Does the problem go away if you insert at the beginning of each test a
>  loop like this:
>
>  (while (> (length (all-threads)) 1)
>  (sleep-for 0.1))
>
> This makes all the 28 tests pass.

And the address of stack_pos doesn't grow anymore?

Yes, it still does. Apparently not out of bounds, because I have run the tests several times. 

> A bit scary though.

Why scary?

I don't like to be at the whim of such a waiting loop before being able to run another thread.