Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unpacking empty array / segmentation fault. #11

Merged
merged 2 commits into from
Feb 18, 2013

Conversation

gutweiler
Copy link
Contributor

Program received signal SIGSEGV, Segmentation fault.
add_next_index_zval (arg=0x0, value=0x159e650) at src/service/php/php-5.4.11/Zend/zend_API.c:1406
1406 return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &value, sizeof(zval *), NULL);
(gdb) bt
#0 add_next_index_zval (arg=0x0, value=0x159e650) at src/service/php/php-5.4.11/Zend/zend_API.c:1406
#1 0x00007ffff3aefa52 in msgpack_unserialize_array_item (unpack=0x7fffffff11e0, container=0x7fffffff3290, obj=0x159e650)

at src/service/php/msgpack-php/msgpack_unpack.c:498

#2 0x00007ffff3aea769 in template_execute (ctx=0x7fffffff11e0, data=, len=, off=)

at src/service/php/msgpack-php/msgpack/unpack_template.h:338

#3 0x00007ffff3aeb195 in php_msgpack_unserialize (return_value=0x13328c0, str=, str_len=165671)

at src/service/php/msgpack-php/msgpack.c:267

Program received signal SIGSEGV, Segmentation fault.
add_next_index_zval (arg=0x0, value=0x159e650) at src/service/php/php-5.4.11/Zend/zend_API.c:1406
1406            return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &value, sizeof(zval *), NULL);
(gdb) bt
#0  add_next_index_zval (arg=0x0, value=0x159e650) at src/service/php/php-5.4.11/Zend/zend_API.c:1406
msgpack#1  0x00007ffff3aefa52 in msgpack_unserialize_array_item (unpack=0x7fffffff11e0, container=0x7fffffff3290, obj=0x159e650)
    at src/service/php/msgpack-php/msgpack_unpack.c:498
msgpack#2  0x00007ffff3aea769 in template_execute (ctx=0x7fffffff11e0, data=<value optimized out>, len=<value optimized out>, off=<value optimized out>)
    at src/service/php/msgpack-php/msgpack/unpack_template.h:338
msgpack#3  0x00007ffff3aeb195 in php_msgpack_unserialize (return_value=0x13328c0, str=<value optimized out>, str_len=165671)
    at src/service/php/msgpack-php/msgpack.c:267
@gutweiler
Copy link
Contributor Author

@laruence added 137.phpt - the segfault only happens if there is some data with empty arrays in it.

@laruence
Copy link
Member

laruence commented Feb 6, 2013

thanks very much. I will look into it soon(on vacation now), thanks

laruence added a commit that referenced this pull request Feb 18, 2013
Fix unpacking empty array / segmentation fault.
@laruence laruence merged commit 4376a32 into msgpack:master Feb 18, 2013
@laruence
Copy link
Member

sorry for the delay, merged , thanks for your contribution :)

@ghost ghost assigned laruence Feb 18, 2013
@joeyhub joeyhub mentioned this pull request May 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants