ext-jsonreader
ext-jsonreader copied to clipboard
PHP 5.5 compatibility
After upgrading to PHP 5.5 I got a 'Bus Error 10' when including the module.
gdb php
(gdb) set args -m
(gdb) run
...
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x0000000100aed4e0
0x00000001001d1409 in _zend_hash_init ()
(gdb) bt
#0 0x00000001001d1409 in _zend_hash_init ()
#1 0x0000000100aea608 in zm_startup_jsonreader (type=<value temporarily unavailable, due to optimizations>, module_number=<value temporarily unavailable, due to optimizations>) at jsonreader.c:776
#2 0x00000001001cb78d in zend_startup_module_ex ()
#3 0x00000001001d273d in zend_hash_apply ()
#4 0x00000001001cbb33 in zend_startup_modules ()
#5 0x0000000100172e47 in php_module_startup ()
#6 0x000000010024df6f in php_cli_startup ()
#7 0x000000010024c4fe in main ()
Allocating the jsonreader_prop_handlers HashTable solved this problem.
Thanks. I'm trying to add Travis-CI integration to the project so I can run the tests on different PHP environments. Unfortunately the tests are currently failing (not only on your branch, on all of them). I have very little time to invest in this. Eventually I'll merge things, it may just take a while. If you want to help with getting the tests to run properly on Travis-CI, I'd appreciate any help. I've created a branch captolia/php55-compat which contains some work for that (includes your PR too).