<div dir="ltr"><div>I encountered a bad thread concurrency issue using PD in a multi instance/multi thread context. The behavior of the increment and decrement of the static variable *stackcount* is undefined and results mostly in stack overflow. The simplest solution seems to set the variable a TLS with PERTHREAD. Here is a PR that solves the issue: <a href="https://github.com/pure-data/pure-data/pull/288">https://github.com/pure-data/pure-data/pull/288</a>.<br></div><div><br></div><div>Cheers,</div><div>Pierre</div></div>