lisachenko / z-engine

:zap: PHP Engine Direct API
MIT License
448 stars 22 forks source link

Investigate an assertion error in zend_string_destroy #6

Open lisachenko opened 4 years ago

lisachenko commented 4 years ago

Test suite fails in PHP 7.4.0RC3 debug build with message:

php-src/Zend/zend_variables.c:64: zend_string_destroy: Assertion `!(zval_gc_flags((str)->gc.u.type_info) & (1<<6))' failed.

Need to fix this assertion error.

lisachenko commented 4 years ago

I don't know ways to debug this issue, it's too complex right now.

I have a guess, that I'm using immutable strings from PHP. For example, immutable method names in tests and steal pointer to them to use in misc areas of code instead of crafting zend_string entry by hand. Probably, at the end of request GC tries to clean something (hashtable?) and assertion fails.