Comment 7 for bug 1154159

Revision history for this message
In , Mattsch (mattsch) wrote :

=dev-libs/libmemcached-1.0.18-r2 segfaults with the OPT_LIBKETAMA_COMPATIBLE enabled and a call to addServer, then resetServerList and another call to addServer.

Reproducible: Always

Steps to Reproduce:
Example of how to reproduce in php (using pecl-memcached):

<?php
$host = 'localhost';
$port = '11211';
$weight = null;
$m = new Memcached('test');
$m->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true);

var_dump($m->addServer($host, $port, $weight));
var_dump($m->resetServerList());
var_dump($m->addServer($host, $port, $weight));
var_dump($m->getServerList());
?>

Actual Results:
segfault

Expected Results:
A call to addServer after resetServerList should not cause a segfault