Comment #2 on issue 306 by [email protected]: Crash when performing deletion
http://code.google.com/p/memcached/issues/detail?id=306

Checked out the current master (9e09900770e79e4e621bdd274658dfa748404095), disabled setrlimit (RLIMIT_NOFILE, ...) 'cause it doesn't seem to play well with valgrind, compiled and installed it on my Debian Testing machine (build log attached).

Started it as follows:

$ valgrind --leak-check=full --malloc-fill=0xee --free-fill=0xff --trace-children=yes --log-file=$TMPDIR/memcached.vg.%p.log /usr/local/memcached-9e09900/bin/memcached -vv -p 2300 2>$TMPDIR/memcached.log &
  [1] 19335

Attempted to remove two keys as follows:

  $ memrm --servers localhost:2300 --binary ABCDEF xyz
  memrm: ABCDEF: memcache error NOT FOUND
  memrm: xyz: memcache error NOT FOUND

Valgrind and memcached logs are attached.

To summarize, the key is not NUL-terminated and the fprintf may run off the end of the end of the buffer.


Attachments:
        memcached-build.log  17.3 KB
        memcached.log  7.8 KB
        memcached.vg.19335.log  7.6 KB

Reply via email to