Comment 38 for bug 1573594

Revision history for this message
Brian Aker (brianaker) wrote :

Hi,

From the code:
memcached_return_t rc= memcached_response(server, mech, sizeof(mech), NULL);
  if (memcached_failed(rc))

memcached_response() adds NULL to strings if memcached_response() successful, otherwise the code follows the error path. The author of this report mentions:
libmemcached/response.cc:619
which is:
          if ((rc= memcached_safe_read(instance, buffer, bodylen)) != MEMCACHED_SUCCESS)
          {
            return MEMCACHED_UNKNOWN_READ_FAILURE;
          }

As you can see, an error is returned back to memcached_sasl as mentioned in the original report.

All that you will achieve with calling memset() in this manner is hide any real bug that valgrind would find.

The reason why "This bug is difficult to reproduce since it depends on the contents of the stack.", is because there is no bug in the reporters work.

I cannot find a case of this bug being reported upstream, otherwise I would close it there with above message.

Thanks,

   -- Brian

FWIW I appreciate people going to the effort of reporting bugs, it takes time to write them up.