ixqbar / phpssdb

This is a client written in C as a PHP module for ssdb.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

php7 multi_get Segmentation fault (core dumped)

necromant2005 opened this issue · comments

Affected php versions (I've checked, maybe more): 7.0.4 , 7.0.5 , 7.0.6 (current)

$keys = array_map(function($key) { return md5('A') . md5($key); }, range(1, 20));
$ssdb = new SSDB ();
$ssdb->connect("127.0.0.1", 8888);
$ssdb->option(SSDB ::OPT_SERIALIZER, SSDB::SERIALIZER_PHP);

foreach ($keys as $key) {
   $ssdb->set($key, $key);
}
$result = $ssdb->multi_get($keys); // Segmentation fault (core dumped)
var_dump($result);

Bug fails only in case SSDB ::OPT_SERIALIZER is set to SSDB::SERIALIZER_PHP

commented

use branch php7 ?

Thank you for patch! I'll try it.

YES! The bug is fixed! Thank you!

commented

Thanks for your issue report! I will make it better!