No, it's broken in both modes. In NTS mode, both the thread that handles events (which illegally calls user code) and the main thread are executing concurrently, they may both be calling functions that cause interaction with module globals, which are obviously shared between threads in NTS mode.
You cannot just start threads and execute user code from anywhere, it's not safe in NTS mode and is a horrible violation of share nothing in ZTS mode. It's much more likely to break ZTS mode than NTS, but illegal in both. Cheers Joe On Fri, 29 Mar 2019 at 12:22, Benjamin Eberlei <kont...@beberlei.de> wrote: > > > On Fri, Mar 29, 2019 at 10:59 AM Joe Watkins <krak...@gmail.com> wrote: > >> Specifically the events interface is broken all versions of PHP 7: >> >> - In a non-zts build, it executes user code allocated in Thread A in >> Thread B - that's not allowed. >> - In a zts build, it makes the same mistake as above, and uses a TSRM >> API to set context which itself has been broken since PHP 7.0. >> >> It so happens that PHP 8 has broken the build, but specifically that part >> of the extension has been broken since PHP 7.0. >> > > But I am correct to understand the code still compiles and works in NTS > mode, so its not completely broken, only on ZTS. > >> >> Cheers >> Joe >> >> >> >> On Fri, 29 Mar 2019 at 10:40, Christoph M. Becker <cmbecke...@gmx.de> >> wrote: >> >>> On 29.03.2019 at 10:29, Benjamin Eberlei wrote: >>> >>> > On Fri, Mar 29, 2019 at 10:20 AM Lester Caine <les...@lsces.co.uk> >>> wrote: >>> > >>> >> Currently building 'interbase' extension has been turned off because >>> >> it's failing to pass the changes in master for thread safe operation. >>> I >>> >> understand that it needs someone to work on it and I would love to be >>> >> able to do that but it's development requirements have moved outside >>> the >>> >> area that I can cope with. And many people reliant on it are in the >>> same >>> >> boat, just as they would not be able to contribute to writing code for >>> >> Firebird itself. While not perfect, what we have currently does it's >>> job >>> >> just as PHP5.2 still works on legacy hosting. PDO hopefully will >>> remain >>> >> available, but re-writing 20 years worth of code base for that >>> different >>> >> way of working has the same problem as finding resources to update the >>> >> interbase extension. >>> > >>> > PHP needs to support thread safety in all its extensions, but that >>> doesn't >>> > mean its required for PECL extensions. You probably run PHP in NTS >>> mode, >>> > and if the interbase extension supports that, no need to add thread >>> safety >>> > support while in PECL. The problem is that every extension in php-src >>> MUST >>> > support it, because php supports it. >>> > >>> > To me it feels you are blowing this issue way out of proportion. Please >>> > believe everyone trying to tell you over and over again that you have >>> > nothing to fear from this unbundling. >>> >>> ext/interbase is indeed broken (i.e. uncompilable) in master (not PHP >>> 7.4 though), since PR #3976[1] has been merged. It will certainly be >>> fixed, if the “Unbundle ext/interbase” RFC[2] will be declined; if it >>> will be accepted it might never get fixed. >>> >>> [1] <https://github.com/php/php-src/pull/3976> >>> [2] <https://wiki.php.net/rfc/deprecate-and-remove-ext-interbase> >>> >>> -- >>> Christoph M. Becker >>> >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >>>