==19618== Invalid read of size 1
==19618== at 0xB11B2E: _zval_dtor_func (zend_variables.c:33)
==19618== by 0xAF51F4: _zval_dtor (zend_variables.h:44)
==19618== by 0xAF530F: free_zend_constant (zend_constants.c:36)
==19618== by 0xB2E8A7: _zend_hash_del_el_ex (zend_hash.c:1026)
==19618== by 0xB2E987: _zend_hash_del_el (zend_hash.c:1050)
==19618== by 0xB30283: zend_hash_reverse_apply (zend_hash.c:1628)
==19618== by 0xAF5A8F: clean_non_persistent_constants (zend_constants.c:161)
==19618== by 0xAFA090: shutdown_executor (zend_execute_API.c:378)
==19618== by 0xB15882: zend_deactivate (zend.c:967)
==19618== by 0xA4FF9C: php_request_shutdown (main.c:1833)
==19618== by 0xBEFE16: do_cli (php_cli.c:1141)
==19618== by 0xBF07CB: main (php_cli.c:1344)
==19618== Address 0xfac8544 is 4 bytes inside a block of size 32 free'd
==19618== at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19618== by 0xAD6A8B: _efree (zend_alloc.c:2461)
==19618== by 0xB119A8: zend_string_release (zend_string.h:271)
==19618== by 0xB11BB7: _zval_dtor_func (zend_variables.c:38)
==19618== by 0xF7100BB: _zval_dtor (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF710519: Php::defined(char const*, unsigned long) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF7105B4: Php::defined(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF4C3A4C: test7_constantDefined(Php::Parameters&) (test0007.cpp:35)
==19618== by 0xF4C4483: void Php::ZendCallable::invoke<&(test7_constantDefined(Php::Parameters&))>(_zend_execute_data*, _zval_struct*) (zendcallable.h:400)
==19618== by 0xB81414: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:842)
==19618== by 0xB7FD1B: execute_ex (zend_vm_execute.h:414)
==19618== by 0xB7FF1C: zend_execute (zend_vm_execute.h:458)
==19618== Block was alloc'd at
==19618== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19618== by 0xAD6910: _emalloc (zend_alloc.c:2446)
==19618== by 0xB117B9: zend_string_alloc (zend_string.h:121)
==19618== by 0xB11822: zend_string_init (zend_string.h:157)
==19618== by 0xB1189E: zend_string_dup (zend_string.h:177)
==19618== by 0xB12292: _zval_copy_ctor_func (zend_variables.c:226)
==19618== by 0xF710131: _zval_copy_ctor (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF71035F: Php::define(char const*, unsigned long, Php::Value const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF710487: Php::define(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Php::Value const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF4C39B9: test7_defineConstant(Php::Parameters&) (test0007.cpp:29)
==19618== by 0xF4C4394: void Php::ZendCallable::invoke<&(test7_defineConstant(Php::Parameters&))>(_zend_execute_data*, _zval_struct*) (zendcallable.h:369)
==19618== by 0xB81414: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:842)
==19618==
==19618== Invalid read of size 8
==19618== at 0xB11B70: _zval_dtor_func (zend_variables.c:37)
==19618== by 0xAF51F4: _zval_dtor (zend_variables.h:44)
==19618== by 0xAF530F: free_zend_constant (zend_constants.c:36)
==19618== by 0xB2E8A7: _zend_hash_del_el_ex (zend_hash.c:1026)
==19618== by 0xB2E987: _zend_hash_del_el (zend_hash.c:1050)
==19618== by 0xB30283: zend_hash_reverse_apply (zend_hash.c:1628)
==19618== by 0xAF5A8F: clean_non_persistent_constants (zend_constants.c:161)
==19618== by 0xAFA090: shutdown_executor (zend_execute_API.c:378)
==19618== by 0xB15882: zend_deactivate (zend.c:967)
==19618== by 0xA4FF9C: php_request_shutdown (main.c:1833)
==19618== by 0xBEFE16: do_cli (php_cli.c:1141)
==19618== by 0xBF07CB: main (php_cli.c:1344)
==19618== Address 0xfac8550 is 16 bytes inside a block of size 32 free'd
==19618== at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19618== by 0xAD6A8B: _efree (zend_alloc.c:2461)
==19618== by 0xB119A8: zend_string_release (zend_string.h:271)
==19618== by 0xB11BB7: _zval_dtor_func (zend_variables.c:38)
==19618== by 0xF7100BB: _zval_dtor (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF710519: Php::defined(char const*, unsigned long) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF7105B4: Php::defined(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF4C3A4C: test7_constantDefined(Php::Parameters&) (test0007.cpp:35)
==19618== by 0xF4C4483: void Php::ZendCallable::invoke<&(test7_constantDefined(Php::Parameters&))>(_zend_execute_data*, _zval_struct*) (zendcallable.h:400)
==19618== by 0xB81414: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:842)
==19618== by 0xB7FD1B: execute_ex (zend_vm_execute.h:414)
==19618== by 0xB7FF1C: zend_execute (zend_vm_execute.h:458)
==19618== Block was alloc'd at
==19618== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19618== by 0xAD6910: _emalloc (zend_alloc.c:2446)
==19618== by 0xB117B9: zend_string_alloc (zend_string.h:121)
==19618== by 0xB11822: zend_string_init (zend_string.h:157)
==19618== by 0xB1189E: zend_string_dup (zend_string.h:177)
==19618== by 0xB12292: _zval_copy_ctor_func (zend_variables.c:226)
==19618== by 0xF710131: _zval_copy_ctor (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF71035F: Php::define(char const*, unsigned long, Php::Value const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF710487: Php::define(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Php::Value const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF4C39B9: test7_defineConstant(Php::Parameters&) (test0007.cpp:29)
==19618== by 0xF4C4394: void Php::ZendCallable::invoke<&(test7_defineConstant(Php::Parameters&))>(_zend_execute_data*, _zval_struct*) (zendcallable.h:369)
==19618== by 0xB81414: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:842)
==19618==
==19618== Invalid read of size 1
==19618== at 0xB11B78: _zval_dtor_func (zend_variables.c:37)
==19618== by 0xAF51F4: _zval_dtor (zend_variables.h:44)
==19618== by 0xAF530F: free_zend_constant (zend_constants.c:36)
==19618== by 0xB2E8A7: _zend_hash_del_el_ex (zend_hash.c:1026)
==19618== by 0xB2E987: _zend_hash_del_el (zend_hash.c:1050)
==19618== by 0xB30283: zend_hash_reverse_apply (zend_hash.c:1628)
==19618== by 0xAF5A8F: clean_non_persistent_constants (zend_constants.c:161)
==19618== by 0xAFA090: shutdown_executor (zend_execute_API.c:378)
==19618== by 0xB15882: zend_deactivate (zend.c:967)
==19618== by 0xA4FF9C: php_request_shutdown (main.c:1833)
==19618== by 0xBEFE16: do_cli (php_cli.c:1141)
==19618== by 0xBF07CB: main (php_cli.c:1344)
==19618== Address 0xfac855d is 29 bytes inside a block of size 32 free'd
==19618== at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19618== by 0xAD6A8B: _efree (zend_alloc.c:2461)
==19618== by 0xB119A8: zend_string_release (zend_string.h:271)
==19618== by 0xB11BB7: _zval_dtor_func (zend_variables.c:38)
==19618== by 0xF7100BB: _zval_dtor (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF710519: Php::defined(char const*, unsigned long) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF7105B4: Php::defined(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF4C3A4C: test7_constantDefined(Php::Parameters&) (test0007.cpp:35)
==19618== by 0xF4C4483: void Php::ZendCallable::invoke<&(test7_constantDefined(Php::Parameters&))>(_zend_execute_data*, _zval_struct*) (zendcallable.h:400)
==19618== by 0xB81414: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:842)
==19618== by 0xB7FD1B: execute_ex (zend_vm_execute.h:414)
==19618== by 0xB7FF1C: zend_execute (zend_vm_execute.h:458)
==19618== Block was alloc'd at
==19618== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19618== by 0xAD6910: _emalloc (zend_alloc.c:2446)
==19618== by 0xB117B9: zend_string_alloc (zend_string.h:121)
==19618== by 0xB11822: zend_string_init (zend_string.h:157)
==19618== by 0xB1189E: zend_string_dup (zend_string.h:177)
==19618== by 0xB12292: _zval_copy_ctor_func (zend_variables.c:226)
==19618== by 0xF710131: _zval_copy_ctor (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF71035F: Php::define(char const*, unsigned long, Php::Value const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF710487: Php::define(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Php::Value const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF4C39B9: test7_defineConstant(Php::Parameters&) (test0007.cpp:29)
==19618== by 0xF4C4394: void Php::ZendCallable::invoke<&(test7_defineConstant(Php::Parameters&))>(_zend_execute_data*, _zval_struct*) (zendcallable.h:369)
==19618== by 0xB81414: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:842)
==19618==
==19618== Invalid read of size 1
==19618== at 0xB1193F: zend_string_release (zend_string.h:269)
==19618== by 0xB11BB7: _zval_dtor_func (zend_variables.c:38)
==19618== by 0xAF51F4: _zval_dtor (zend_variables.h:44)
==19618== by 0xAF530F: free_zend_constant (zend_constants.c:36)
==19618== by 0xB2E8A7: _zend_hash_del_el_ex (zend_hash.c:1026)
==19618== by 0xB2E987: _zend_hash_del_el (zend_hash.c:1050)
==19618== by 0xB30283: zend_hash_reverse_apply (zend_hash.c:1628)
==19618== by 0xAF5A8F: clean_non_persistent_constants (zend_constants.c:161)
==19618== by 0xAFA090: shutdown_executor (zend_execute_API.c:378)
==19618== by 0xB15882: zend_deactivate (zend.c:967)
==19618== by 0xA4FF9C: php_request_shutdown (main.c:1833)
==19618== by 0xBEFE16: do_cli (php_cli.c:1141)
==19618== Address 0xfac8545 is 5 bytes inside a block of size 32 free'd
==19618== at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19618== by 0xAD6A8B: _efree (zend_alloc.c:2461)
==19618== by 0xB119A8: zend_string_release (zend_string.h:271)
==19618== by 0xB11BB7: _zval_dtor_func (zend_variables.c:38)
==19618== by 0xF7100BB: _zval_dtor (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF710519: Php::defined(char const*, unsigned long) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF7105B4: Php::defined(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF4C3A4C: test7_constantDefined(Php::Parameters&) (test0007.cpp:35)
==19618== by 0xF4C4483: void Php::ZendCallable::invoke<&(test7_constantDefined(Php::Parameters&))>(_zend_execute_data*, _zval_struct*) (zendcallable.h:400)
==19618== by 0xB81414: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:842)
==19618== by 0xB7FD1B: execute_ex (zend_vm_execute.h:414)
==19618== by 0xB7FF1C: zend_execute (zend_vm_execute.h:458)
==19618== Block was alloc'd at
==19618== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19618== by 0xAD6910: _emalloc (zend_alloc.c:2446)
==19618== by 0xB117B9: zend_string_alloc (zend_string.h:121)
==19618== by 0xB11822: zend_string_init (zend_string.h:157)
==19618== by 0xB1189E: zend_string_dup (zend_string.h:177)
==19618== by 0xB12292: _zval_copy_ctor_func (zend_variables.c:226)
==19618== by 0xF710131: _zval_copy_ctor (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF71035F: Php::define(char const*, unsigned long, Php::Value const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF710487: Php::define(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Php::Value const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF4C39B9: test7_defineConstant(Php::Parameters&) (test0007.cpp:29)
==19618== by 0xF4C4394: void Php::ZendCallable::invoke<&(test7_defineConstant(Php::Parameters&))>(_zend_execute_data*, _zval_struct*) (zendcallable.h:369)
==19618== by 0xB81414: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:842)
==19618==
==19618== Invalid read of size 4
==19618== at 0xB11951: zend_string_release (zend_string.h:270)
==19618== by 0xB11BB7: _zval_dtor_func (zend_variables.c:38)
==19618== by 0xAF51F4: _zval_dtor (zend_variables.h:44)
==19618== by 0xAF530F: free_zend_constant (zend_constants.c:36)
==19618== by 0xB2E8A7: _zend_hash_del_el_ex (zend_hash.c:1026)
==19618== by 0xB2E987: _zend_hash_del_el (zend_hash.c:1050)
==19618== by 0xB30283: zend_hash_reverse_apply (zend_hash.c:1628)
==19618== by 0xAF5A8F: clean_non_persistent_constants (zend_constants.c:161)
==19618== by 0xAFA090: shutdown_executor (zend_execute_API.c:378)
==19618== by 0xB15882: zend_deactivate (zend.c:967)
==19618== by 0xA4FF9C: php_request_shutdown (main.c:1833)
==19618== by 0xBEFE16: do_cli (php_cli.c:1141)
==19618== Address 0xfac8540 is 0 bytes inside a block of size 32 free'd
==19618== at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19618== by 0xAD6A8B: _efree (zend_alloc.c:2461)
==19618== by 0xB119A8: zend_string_release (zend_string.h:271)
==19618== by 0xB11BB7: _zval_dtor_func (zend_variables.c:38)
==19618== by 0xF7100BB: _zval_dtor (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF710519: Php::defined(char const*, unsigned long) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF7105B4: Php::defined(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF4C3A4C: test7_constantDefined(Php::Parameters&) (test0007.cpp:35)
==19618== by 0xF4C4483: void Php::ZendCallable::invoke<&(test7_constantDefined(Php::Parameters&))>(_zend_execute_data*, _zval_struct*) (zendcallable.h:400)
==19618== by 0xB81414: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:842)
==19618== by 0xB7FD1B: execute_ex (zend_vm_execute.h:414)
==19618== by 0xB7FF1C: zend_execute (zend_vm_execute.h:458)
==19618== Block was alloc'd at
==19618== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19618== by 0xAD6910: _emalloc (zend_alloc.c:2446)
==19618== by 0xB117B9: zend_string_alloc (zend_string.h:121)
==19618== by 0xB11822: zend_string_init (zend_string.h:157)
==19618== by 0xB1189E: zend_string_dup (zend_string.h:177)
==19618== by 0xB12292: _zval_copy_ctor_func (zend_variables.c:226)
==19618== by 0xF710131: _zval_copy_ctor (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF71035F: Php::define(char const*, unsigned long, Php::Value const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF710487: Php::define(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Php::Value const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF4C39B9: test7_defineConstant(Php::Parameters&) (test0007.cpp:29)
==19618== by 0xF4C4394: void Php::ZendCallable::invoke<&(test7_defineConstant(Php::Parameters&))>(_zend_execute_data*, _zval_struct*) (zendcallable.h:369)
==19618== by 0xB81414: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:842)
==19618==
==19618== Invalid write of size 4
==19618== at 0xB1195A: zend_string_release (zend_string.h:270)
==19618== by 0xB11BB7: _zval_dtor_func (zend_variables.c:38)
==19618== by 0xAF51F4: _zval_dtor (zend_variables.h:44)
==19618== by 0xAF530F: free_zend_constant (zend_constants.c:36)
==19618== by 0xB2E8A7: _zend_hash_del_el_ex (zend_hash.c:1026)
==19618== by 0xB2E987: _zend_hash_del_el (zend_hash.c:1050)
==19618== by 0xB30283: zend_hash_reverse_apply (zend_hash.c:1628)
==19618== by 0xAF5A8F: clean_non_persistent_constants (zend_constants.c:161)
==19618== by 0xAFA090: shutdown_executor (zend_execute_API.c:378)
==19618== by 0xB15882: zend_deactivate (zend.c:967)
==19618== by 0xA4FF9C: php_request_shutdown (main.c:1833)
==19618== by 0xBEFE16: do_cli (php_cli.c:1141)
==19618== Address 0xfac8540 is 0 bytes inside a block of size 32 free'd
==19618== at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19618== by 0xAD6A8B: _efree (zend_alloc.c:2461)
==19618== by 0xB119A8: zend_string_release (zend_string.h:271)
==19618== by 0xB11BB7: _zval_dtor_func (zend_variables.c:38)
==19618== by 0xF7100BB: _zval_dtor (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF710519: Php::defined(char const*, unsigned long) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF7105B4: Php::defined(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF4C3A4C: test7_constantDefined(Php::Parameters&) (test0007.cpp:35)
==19618== by 0xF4C4483: void Php::ZendCallable::invoke<&(test7_constantDefined(Php::Parameters&))>(_zend_execute_data*, _zval_struct*) (zendcallable.h:400)
==19618== by 0xB81414: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:842)
==19618== by 0xB7FD1B: execute_ex (zend_vm_execute.h:414)
==19618== by 0xB7FF1C: zend_execute (zend_vm_execute.h:458)
==19618== Block was alloc'd at
==19618== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19618== by 0xAD6910: _emalloc (zend_alloc.c:2446)
==19618== by 0xB117B9: zend_string_alloc (zend_string.h:121)
==19618== by 0xB11822: zend_string_init (zend_string.h:157)
==19618== by 0xB1189E: zend_string_dup (zend_string.h:177)
==19618== by 0xB12292: _zval_copy_ctor_func (zend_variables.c:226)
==19618== by 0xF710131: _zval_copy_ctor (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF71035F: Php::define(char const*, unsigned long, Php::Value const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF710487: Php::define(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Php::Value const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF4C39B9: test7_defineConstant(Php::Parameters&) (test0007.cpp:29)
==19618== by 0xF4C4394: void Php::ZendCallable::invoke<&(test7_defineConstant(Php::Parameters&))>(_zend_execute_data*, _zval_struct*) (zendcallable.h:369)
==19618== by 0xB81414: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:842)
==19618==
==19618== Invalid read of size 4
==19618== at 0xB11960: zend_string_release (zend_string.h:270)
==19618== by 0xB11BB7: _zval_dtor_func (zend_variables.c:38)
==19618== by 0xAF51F4: _zval_dtor (zend_variables.h:44)
==19618== by 0xAF530F: free_zend_constant (zend_constants.c:36)
==19618== by 0xB2E8A7: _zend_hash_del_el_ex (zend_hash.c:1026)
==19618== by 0xB2E987: _zend_hash_del_el (zend_hash.c:1050)
==19618== by 0xB30283: zend_hash_reverse_apply (zend_hash.c:1628)
==19618== by 0xAF5A8F: clean_non_persistent_constants (zend_constants.c:161)
==19618== by 0xAFA090: shutdown_executor (zend_execute_API.c:378)
==19618== by 0xB15882: zend_deactivate (zend.c:967)
==19618== by 0xA4FF9C: php_request_shutdown (main.c:1833)
==19618== by 0xBEFE16: do_cli (php_cli.c:1141)
==19618== Address 0xfac8540 is 0 bytes inside a block of size 32 free'd
==19618== at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19618== by 0xAD6A8B: _efree (zend_alloc.c:2461)
==19618== by 0xB119A8: zend_string_release (zend_string.h:271)
==19618== by 0xB11BB7: _zval_dtor_func (zend_variables.c:38)
==19618== by 0xF7100BB: _zval_dtor (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF710519: Php::defined(char const*, unsigned long) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF7105B4: Php::defined(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF4C3A4C: test7_constantDefined(Php::Parameters&) (test0007.cpp:35)
==19618== by 0xF4C4483: void Php::ZendCallable::invoke<&(test7_constantDefined(Php::Parameters&))>(_zend_execute_data*, _zval_struct*) (zendcallable.h:400)
==19618== by 0xB81414: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:842)
==19618== by 0xB7FD1B: execute_ex (zend_vm_execute.h:414)
==19618== by 0xB7FF1C: zend_execute (zend_vm_execute.h:458)
==19618== Block was alloc'd at
==19618== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19618== by 0xAD6910: _emalloc (zend_alloc.c:2446)
==19618== by 0xB117B9: zend_string_alloc (zend_string.h:121)
==19618== by 0xB11822: zend_string_init (zend_string.h:157)
==19618== by 0xB1189E: zend_string_dup (zend_string.h:177)
==19618== by 0xB12292: _zval_copy_ctor_func (zend_variables.c:226)
==19618== by 0xF710131: _zval_copy_ctor (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF71035F: Php::define(char const*, unsigned long, Php::Value const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF710487: Php::define(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Php::Value const&) (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF4C39B9: test7_defineConstant(Php::Parameters&) (test0007.cpp:29)
==19618== by 0xF4C4394: void Php::ZendCallable::invoke<&(test7_defineConstant(Php::Parameters&))>(_zend_execute_data*, _zval_struct*) (zendcallable.h:369)
==19618== by 0xB81414: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:842)
==19618== by 0xF7100BB: _zval_dtor (in /PHP-CPP/libphpcpp.so.2.0.0)
==19618== by 0xF710519: Php::defined(char const*, unsigned long) (in /PHP-CPP
Simplified test case:
Results in the following:
The issue is obviously here: