pmmp / ext-pmmpthread

Fork of https://github.com/krakjoe/pthreads with a revamped API and PHP 8.1+ support
Other
82 stars 15 forks source link

Segfault when using PTHREADS_INHERIT_NONE and calling global function #111

Open dktapps opened 1 year ago

dktapps commented 1 year ago

In PHP 8.2, ZEND_INIT_FCALL assumes that the function exists: https://github.com/php/php-src/commit/da684582d74

This is fine for normal code, but pthreads may copy classes without copying functions (even when PTHREADS_INHERIT_NONE is used), creating a problem - a mistake in code that would have previously caused a thrown Error will now crash the interpreter instead.

A few possible solutions: