BitOne / php-meminfo

PHP extension to get insight about memory usage
MIT License
1.08k stars 78 forks source link

Fix segfault when zend_rebuild_symbol_table returns null #82

Closed mbonneau closed 5 years ago

mbonneau commented 5 years ago

If meminfo_dump is called inside a shutdown function (register_shutdown_function), zend_rebuild_symbol_table can return null. This causes a segfault.

Shutdown functions are used in a couple of different event-loop implementations.

This fix just skips over browsing the null symbol table.

BitOne commented 5 years ago

Hi @mbonneau ,

Thanks a lot for the fix. I don't know why the checks are not working properly. Maybe something is amiss with Travis. I need to check that.

BitOne commented 5 years ago

Thanks a lot @mbonneau and sorry for the long delay!