Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package memcached for openSUSE:Factory checked in at 2026-05-28 17:23:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/memcached (Old) and /work/SRC/openSUSE:Factory/.memcached.new.1937 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "memcached" Thu May 28 17:23:56 2026 rev:73 rq:1355337 version:1.6.42 Changes: -------- --- /work/SRC/openSUSE:Factory/memcached/memcached.changes 2026-04-11 22:22:40.411290714 +0200 +++ /work/SRC/openSUSE:Factory/.memcached.new.1937/memcached.changes 2026-05-28 17:24:27.189544721 +0200 @@ -1,0 +2,20 @@ +Fri May 22 10:09:50 UTC 2026 - Petr Gajdos <[email protected]> + +- update to 1.6.42: + * vendor: Instructively warn if vendor blob missing + * proxy: fix write length in extstore miss + * Fix timing side-channel in SASL password database authentication + * proto: fix signed overflow in bodylen for binprot + * proxy: fix underflow with 0 length values + * auth: fix data race during reload + * auth: fix crash when given huge token + * proto: fix crash in binary protocol + * core: fix crashes from slabs reassign + * proxy: check result of buffer parse in match_res + * proxy: fix memory underread when nulling requests + * update data block protocol description to no longer reference obsolete S flag +- see https://github.com/memcached/memcached/wiki/ReleaseNotes1642 for details +- fixes CVE-2026-47783 [bsc#1265873] + CVE-2026-47784 [bsc#1265881] + +------------------------------------------------------------------- Old: ---- memcached-1.6.41.tar.gz New: ---- memcached-1.6.42.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ memcached.spec ++++++ --- /var/tmp/diff_new_pack.Wnop3K/_old 2026-05-28 17:24:28.141584128 +0200 +++ /var/tmp/diff_new_pack.Wnop3K/_new 2026-05-28 17:24:28.145584294 +0200 @@ -42,7 +42,7 @@ %endif %endif Name: memcached -Version: 1.6.41 +Version: 1.6.42 Release: 0 Summary: A high-performance, distributed memory object caching system License: BSD-3-Clause ++++++ memcached-1.6.41.tar.gz -> memcached-1.6.42.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/authfile.c new/memcached-1.6.42/authfile.c --- old/memcached-1.6.41/authfile.c 2026-03-06 21:46:28.000000000 +0100 +++ new/memcached-1.6.42/authfile.c 2026-05-19 00:12:18.000000000 +0200 @@ -7,6 +7,7 @@ #include <sys/stat.h> #include <unistd.h> #include <inttypes.h> +#include <pthread.h> #include "authfile.h" #include "util.h" @@ -27,6 +28,7 @@ auth_t main_auth_entries[MAX_ENTRIES]; int entry_cnt = 0; char *main_auth_data = NULL; +pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; enum authfile_ret authfile_load(const char *file) { struct stat sb; @@ -100,6 +102,7 @@ entry_cur++; } + pthread_mutex_lock(&lock); // swap the main pointer out now, so if there's an error reloading we // don't break the existing authentication. if (main_auth_data != NULL) { @@ -109,6 +112,7 @@ entry_cnt = used; main_auth_data = auth_data; memcpy(main_auth_entries, auth_entries, sizeof(auth_entries)); + pthread_mutex_unlock(&lock); (void)fclose(pwfile); @@ -117,15 +121,19 @@ // if only loading the file could be this short... int authfile_check(const char *user, unsigned int ulen, const char *pass, unsigned int plen) { + int ret = 0; + pthread_mutex_lock(&lock); for (int x = 0; x < entry_cnt; x++) { auth_t *e = &main_auth_entries[x]; if (ulen == e->ulen && plen == e->plen && safe_memcmp(user, e->user, e->ulen) && safe_memcmp(pass, e->pass, e->plen)) { - return 1; + ret = 1; + break; } } + pthread_mutex_unlock(&lock); - return 0; + return ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/configure new/memcached-1.6.42/configure --- old/memcached-1.6.41/configure 2026-03-06 22:03:56.000000000 +0100 +++ new/memcached-1.6.42/configure 2026-05-19 00:14:10.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for memcached 1.6.41. +# Generated by GNU Autoconf 2.72 for memcached 1.6.42. # # Report bugs to <[email protected]>. # @@ -604,8 +604,8 @@ # Identity of this package. PACKAGE_NAME='memcached' PACKAGE_TARNAME='memcached' -PACKAGE_VERSION='1.6.41' -PACKAGE_STRING='memcached 1.6.41' +PACKAGE_VERSION='1.6.42' +PACKAGE_STRING='memcached 1.6.42' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='' @@ -1383,7 +1383,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures memcached 1.6.41 to adapt to many kinds of systems. +'configure' configures memcached 1.6.42 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1454,7 +1454,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of memcached 1.6.41:";; + short | recursive ) echo "Configuration of memcached 1.6.42:";; esac cat <<\_ACEOF @@ -1579,7 +1579,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -memcached configure 1.6.41 +memcached configure 1.6.42 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -2194,7 +2194,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by memcached $as_me 1.6.41, which was +It was created by memcached $as_me 1.6.42, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -3745,7 +3745,7 @@ # Define the identity of the package. PACKAGE='memcached' - VERSION='1.6.41' + VERSION='1.6.42' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -9429,7 +9429,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by memcached $as_me 1.6.41, which was +This file was extended by memcached $as_me 1.6.42, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9497,7 +9497,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -memcached config.status 1.6.41 +memcached config.status 1.6.42 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/doc/Makefile new/memcached-1.6.42/doc/Makefile --- old/memcached-1.6.41/doc/Makefile 2026-03-06 22:03:59.000000000 +0100 +++ new/memcached-1.6.42/doc/Makefile 2026-05-19 00:14:13.000000000 +0200 @@ -194,10 +194,10 @@ PACKAGE = memcached PACKAGE_BUGREPORT = [email protected] PACKAGE_NAME = memcached -PACKAGE_STRING = memcached 1.6.41 +PACKAGE_STRING = memcached 1.6.42 PACKAGE_TARNAME = memcached PACKAGE_URL = -PACKAGE_VERSION = 1.6.41 +PACKAGE_VERSION = 1.6.42 PATH_SEPARATOR = : PKG_CONFIG = /usr/bin/pkg-config PKG_CONFIG_LIBDIR = @@ -208,7 +208,7 @@ SET_MAKE = SHELL = /bin/bash STRIP = -VERSION = 1.6.41 +VERSION = 1.6.42 XML2RFC = no XSLTPROC = no abs_builddir = /home/dormando/p/code/memcached/doc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/doc/protocol.txt new/memcached-1.6.42/doc/protocol.txt --- old/memcached-1.6.41/doc/protocol.txt 2026-03-05 00:05:05.000000000 +0100 +++ new/memcached-1.6.42/doc/protocol.txt 2026-05-19 00:12:18.000000000 +0200 @@ -713,9 +713,8 @@ <data block>\r\n -- <data block> is a chunk of arbitrary 8-bit data of length supplied by an 'S' - flag and token from the request line. If no 'S' flag is supplied the data - is assumed to be 0 length. +- <data block> is a chunk of arbitrary 8-bit data of length <datalen> + from the previous line. After sending the command line and the data block the client awaits the reply, which is of the format: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/memcached.spec new/memcached-1.6.42/memcached.spec --- old/memcached-1.6.41/memcached.spec 2026-03-06 22:03:56.000000000 +0100 +++ new/memcached-1.6.42/memcached.spec 2026-05-19 00:14:09.000000000 +0200 @@ -27,7 +27,7 @@ %endif Name: memcached -Version: 1.6.41 +Version: 1.6.42 Release: 1%{?dist} Summary: High Performance, Distributed Memory Object Cache diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/proto_bin.c new/memcached-1.6.42/proto_bin.c --- old/memcached-1.6.41/proto_bin.c 2026-03-05 00:05:05.000000000 +0100 +++ new/memcached-1.6.42/proto_bin.c 2026-05-19 00:12:18.000000000 +0200 @@ -903,6 +903,14 @@ return; } + // This upper limit macro is deliberately lower than the signed int max, + // enough to also allow the vlen+2 adjustment without overflowing. + if (bodylen > ITEM_SIZE_MAX_UPPER_LIMIT) { + write_bin_error(c, PROTOCOL_BINARY_RESPONSE_EINVAL, NULL, 0); + c->close_after_write = true; + return; + } + if (settings.sasl && !authenticated(c)) { write_bin_error(c, PROTOCOL_BINARY_RESPONSE_AUTH_ERROR, NULL, 0); c->close_after_write = true; @@ -1139,7 +1147,7 @@ /* FIXME: losing c->cmd since it's translated below. refactor? */ LOGGER_LOG(c->thread->l, LOG_MUTATIONS, LOGGER_ITEM_STORE, NULL, status, 0, key, nkey, req->message.body.expiration, - ITEM_clsid(it), c->sfd); + 0, c->sfd); /* Avoid stale data persisting in cache because we failed alloc. * Unacceptable for SET. Anywhere else too? */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/proto_text.c new/memcached-1.6.42/proto_text.c --- old/memcached-1.6.41/proto_text.c 2026-03-06 21:46:28.000000000 +0100 +++ new/memcached-1.6.42/proto_text.c 2026-05-19 00:12:18.000000000 +0200 @@ -222,6 +222,7 @@ #define COMMAND_TOKEN 0 #define SUBCOMMAND_TOKEN 1 #define KEY_TOKEN 1 +#define MAX_AUTH_REQ_LEN 16384 int try_read_command_asciiauth(conn *c) { mcmc_tokenizer_t tok; @@ -275,6 +276,17 @@ return 1; } + if (size > MAX_AUTH_REQ_LEN) { + if (!c->resp) { + if (!resp_start(c)) { + conn_set_state(c, conn_closing); + return 1; + } + } + out_string(c, "CLIENT_ERROR auth token too long"); + return 1; + } + // we don't actually care about the key at all; it can be anything. // we do care about the size of the remaining read. c->rlbytes = size + 2; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/proxy_internal.c new/memcached-1.6.42/proxy_internal.c --- old/memcached-1.6.41/proxy_internal.c 2026-03-05 00:05:05.000000000 +0100 +++ new/memcached-1.6.42/proxy_internal.c 2026-05-19 00:12:18.000000000 +0200 @@ -42,7 +42,7 @@ } else if (io->gettype == PROXY_STORAGE_MG) { resp->iov[0].iov_len = 4; resp->iov[0].iov_base = "EN\r\n"; - resp->tosend = 5; + resp->tosend = 4; } else { assert(1 == 0); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/proxy_mutator.c new/memcached-1.6.42/proxy_mutator.c --- old/memcached-1.6.41/proxy_mutator.c 2026-03-05 00:05:05.000000000 +0100 +++ new/memcached-1.6.42/proxy_mutator.c 2026-05-19 00:12:18.000000000 +0200 @@ -996,6 +996,10 @@ return -1; } + if (run->vlen < 2 || memcmp(run->vbuf+run->vlen-2, "\r\n", 2) != 0) { + return -1; + } + // count the number of digits in vlen to reserve space. // // oddly algorithms to count digits and write digits are similar (outside @@ -1011,6 +1015,7 @@ // print the vlen into the buffer // we remove the \r\n from the protocol length mut_step_r(valcopy) { + // Note: vlen must not be < 2 during the _n stage to avoid underflowing. run->d_pos = itoa_u64(run->vlen-2, run->d_pos); return true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/proxy_request.c new/memcached-1.6.42/proxy_request.c --- old/memcached-1.6.41/proxy_request.c 2026-03-05 00:05:05.000000000 +0100 +++ new/memcached-1.6.42/proxy_request.c 2026-05-19 00:12:18.000000000 +0200 @@ -76,7 +76,7 @@ p += pr->tok.tokens[pr->tok.ntokens] - pr->tok.tokens[idx+1]; } else { // If we removed something from the end we might've left some spaces. - while (*(p-1) == ' ') { + while (p > temp && *(p-1) == ' ') { p--; } } @@ -656,7 +656,11 @@ // requests all have keys. check for an opaque. int opaque_len = 0; const char *opaque_token = mcmc_token_get_flag(rq->pr.request, &rq->pr.tok, 'O', &opaque_len); - mcmc_parse_buf(rs->buf, rs->blen, &reresp); + if (mcmc_parse_buf(rs->buf, rs->blen, &reresp) != MCMC_OK) { + lua_pushboolean(L, 0); + lua_pushstring(L, "failed to parse response"); + return 2; + } mcmc_tokenize_res(rs->buf, reresp.reslen, &rs->tok); int matched = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/sasl_defs.c new/memcached-1.6.42/sasl_defs.c --- old/memcached-1.6.41/sasl_defs.c 2024-10-31 21:47:40.000000000 +0100 +++ new/memcached-1.6.42/sasl_defs.c 2026-05-19 00:12:18.000000000 +0200 @@ -71,19 +71,18 @@ char buffer[MAX_ENTRY_LEN]; bool ok = false; - while ((fgets(buffer, sizeof(buffer), pwfile)) != NULL) { - if (memcmp(user, buffer, unmlen) == 0 && buffer[unmlen] == ':') { - /* This is the correct user */ - ++unmlen; - if (memcmp(pass, buffer + unmlen, passlen) == 0 && - (buffer[unmlen + passlen] == ':' || /* Additional tokens */ - buffer[unmlen + passlen] == '\n' || /* end of line */ - buffer[unmlen + passlen] == '\r'|| /* dos format? */ - buffer[unmlen + passlen] == '\0')) { /* line truncated */ + while (1) { + memset(buffer, 0, sizeof(buffer)); + if (fgets(buffer, sizeof(buffer), pwfile) == NULL) + break; + if (safe_memcmp(user, buffer, unmlen) && buffer[unmlen] == ':') { + if (safe_memcmp(pass, buffer + unmlen + 1, passlen) && + (buffer[unmlen + 1 + passlen] == ':' || + buffer[unmlen + 1 + passlen] == '\n' || + buffer[unmlen + 1 + passlen] == '\r' || + buffer[unmlen + 1 + passlen] == '\0')) { ok = true; } - - break; } } (void)fclose(pwfile); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/slabs.c new/memcached-1.6.42/slabs.c --- old/memcached-1.6.41/slabs.c 2026-03-05 00:03:46.000000000 +0100 +++ new/memcached-1.6.42/slabs.c 2026-05-19 00:12:18.000000000 +0200 @@ -85,6 +85,13 @@ return res; } +bool slabs_class_check(const int id) { + if (id < SLAB_GLOBAL_PAGE_POOL || id > power_largest) { + return false; + } + return true; +} + unsigned int slabs_size(const int clsid) { return slabclass[clsid].size; } @@ -759,6 +766,7 @@ // For now we won't handle the error, and a subsequent commit should // remove the need to resize the slab list. do_grow_slab_list(did); + assert(d_cls->slab_list != NULL); d_cls->slab_list[d_cls->slabs++] = page; /* Don't need to split the page into chunks if we're just storing it */ if (did > SLAB_GLOBAL_PAGE_POOL) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/slabs.h new/memcached-1.6.42/slabs.h --- old/memcached-1.6.41/slabs.h 2026-03-05 00:03:46.000000000 +0100 +++ new/memcached-1.6.42/slabs.h 2026-05-19 00:12:18.000000000 +0200 @@ -20,6 +20,7 @@ unsigned int slabs_clsid(const size_t size); unsigned int slabs_size(const int clsid); +bool slabs_class_check(const int id); /** Allocate object of given length. 0 on error */ /*@null@*/ #define SLABS_ALLOC_NO_NEWPAGE 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/slabs_mover.c new/memcached-1.6.42/slabs_mover.c --- old/memcached-1.6.41/slabs_mover.c 2026-03-06 21:46:28.000000000 +0100 +++ new/memcached-1.6.42/slabs_mover.c 2026-05-19 00:12:18.000000000 +0200 @@ -727,9 +727,9 @@ /* TODO: If we end up back at -1, return a new error type */ } - if (src < SLAB_GLOBAL_PAGE_POOL || src > MAX_NUMBER_OF_SLAB_CLASSES|| - dst < SLAB_GLOBAL_PAGE_POOL || dst > MAX_NUMBER_OF_SLAB_CLASSES) + if (!slabs_class_check(src) || !slabs_class_check(dst)) { return REASSIGN_BADCLASS; + } if (slabs_page_count(src) < 2) { return REASSIGN_NOSPARE; Binary files old/memcached-1.6.41/t/.slabs-reassign2.t.swp and new/memcached-1.6.42/t/.slabs-reassign2.t.swp differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/t/ascii-auth.t new/memcached-1.6.42/t/ascii-auth.t --- old/memcached-1.6.41/t/ascii-auth.t 2024-08-01 20:54:00.000000000 +0200 +++ new/memcached-1.6.42/t/ascii-auth.t 2026-05-19 00:12:18.000000000 +0200 @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; -use Test::More tests => 9; +use Test::More tests => 10; use FindBin qw($Bin); use lib "$Bin/lib"; use MemcachedTest; @@ -21,6 +21,10 @@ print $sock "set foo 0 0 7\r\nfoo bab\r\n"; like(scalar <$sock>, qr/CLIENT_ERROR/, "failed to authenticate"); +# Super long tokens are invalid. +print $sock "set foo 0 0 2147483646\r\nasfd\r\n"; +like(scalar <$sock>, qr/CLIENT_ERROR/, "failed to authenticate"); + # Try for real. print $sock "set foo 0 0 7\r\nfoo bar\r\n"; like(scalar <$sock>, qr/STORED/, "authenticated?"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/t/proxymut.lua new/memcached-1.6.42/t/proxymut.lua --- old/memcached-1.6.41/t/proxymut.lua 2026-03-05 00:05:05.000000000 +0100 +++ new/memcached-1.6.42/t/proxymut.lua 2026-05-19 00:12:18.000000000 +0200 @@ -121,6 +121,11 @@ local res = rctx:enqueue_and_wait(r, mginth) local ret = mut_mgresflagall(nres, res) return nres + elseif key == "mgresvalshort" then + if mut_mgresval(nres, "VA", "x") == false then + mut_reserr(nres) + end + return nres elseif key == "mgresteapot" then local res = mut_reserr(nres) if nres:ok() or nres:hit() then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/t/proxymut.t new/memcached-1.6.42/t/proxymut.t --- old/memcached-1.6.41/t/proxymut.t 2026-03-05 00:05:05.000000000 +0100 +++ new/memcached-1.6.42/t/proxymut.t 2026-05-19 00:12:18.000000000 +0200 @@ -137,6 +137,15 @@ $t->c_recv("SERVER_ERROR teapot\r\n"); $t->clear(); }; + + subtest 'mgresvalshort' => sub { + $t->c_send("mg mgresvalshort\r\n"); + $t->c_recv("SERVER_ERROR teapot\r\n"); + # Ensure no protocol corruption ensued. + $t->c_send("mg mgres\r\n"); + $t->c_recv("HD\r\n"); + $t->clear(); + }; } done_testing(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/t/proxyrequest.lua new/memcached-1.6.42/t/proxyrequest.lua --- old/memcached-1.6.41/t/proxyrequest.lua 2026-03-05 00:05:05.000000000 +0100 +++ new/memcached-1.6.42/t/proxyrequest.lua 2026-05-19 00:12:18.000000000 +0200 @@ -109,6 +109,16 @@ end end end + + if k == "nullrequest" then + -- test reducing a request from 1 token to 0 tokens. Since + -- this is normally impossible due to 1 token requests being + -- invalid protocol, we must create a single token request and + -- then nuke it. + local nreq = mcp.request("version\r\n") + nreq:token(1, "") + return "HD\r\n" + end end end}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/t/proxyrequest.t new/memcached-1.6.42/t/proxyrequest.t --- old/memcached-1.6.41/t/proxyrequest.t 2026-01-20 20:53:52.000000000 +0100 +++ new/memcached-1.6.42/t/proxyrequest.t 2026-05-19 00:12:18.000000000 +0200 @@ -27,6 +27,11 @@ $t->set_c($ps); $t->accept_backends(); +subtest 'nullrequest' => sub { + $t->c_send("mg nullrequest\r\n"); + $t->c_recv("SERVER_ERROR lua failure\r\n", "disliked null request"); +}; + subtest 'req:flag_add()' => sub { $t->c_send("mg add1 N50\r\n"); $t->be_recv(0, "mg add1 N50 F\r\n", "be received appended request"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/t/slabs_reassign.t new/memcached-1.6.42/t/slabs_reassign.t --- old/memcached-1.6.41/t/slabs_reassign.t 2024-08-01 20:54:00.000000000 +0200 +++ new/memcached-1.6.42/t/slabs_reassign.t 2026-05-19 00:12:18.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 131; +use Test::More; use FindBin qw($Bin); use lib "$Bin/lib"; use MemcachedTest; @@ -14,7 +14,7 @@ my $sock = $server->sock; -# Fill a largeish slab until it evicts (honors the -m 6) +# Fill a largeish slab until it evicts my $bigdata = 'x' x 70000; # slab 31 for (1 .. 60) { print $sock "set bfoo$_ 0 0 70000\r\n", $bigdata, "\r\n"; @@ -28,6 +28,20 @@ is(scalar <$sock>, "STORED\r\n", "stored key"); } +# Reassign page to invalid class. +print $sock "slabs reassign 31 64\r\n"; +like(scalar <$sock>, qr/^BADCLASS/, "Class 64 invalid"); + +# Reassign page to uninitialized class. +print $sock "slabs reassign 31 60\r\n"; +like(scalar <$sock>, qr/^BADCLASS/, "Class 60 invalid"); + +# Ensure the largest available class works. +# FIXME: need to pull the max class from stats/settings, but I don't think +# that's actually exposed there. +print $sock "slabs reassign 31 39\r\n"; +like(scalar <$sock>, qr/^OK/, "Class 39 (power_largest) valid"); + my $items_before = mem_stats($sock, "items"); isnt($items_before->{"items:31:evicted"}, 0, "slab 31 evicted is nonzero"); isnt($items_before->{"items:25:evicted"}, 0, "slab 25 evicted is nonzero"); @@ -75,4 +89,4 @@ print $sock "set sfoo51 0 0 20000\r\n", $smalldata, "\r\n"; is(scalar <$sock>, "STORED\r\n", "stored key"); -# Do need to come up with better automated tests for this. +done_testing(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/vendor/Makefile new/memcached-1.6.42/vendor/Makefile --- old/memcached-1.6.41/vendor/Makefile 2026-03-05 00:05:05.000000000 +0100 +++ new/memcached-1.6.42/vendor/Makefile 2026-05-19 00:12:18.000000000 +0200 @@ -1,4 +1,5 @@ all: + @if [ ! -f lua/Makefile ]; then echo "Missing lua application, run $(CURDIR)/fetch.sh script to download it"; exit 1; fi cd lua && $(MAKE) all MYCFLAGS="-g" && cd .. clean: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/memcached-1.6.41/version.m4 new/memcached-1.6.42/version.m4 --- old/memcached-1.6.41/version.m4 2026-03-06 22:03:56.000000000 +0100 +++ new/memcached-1.6.42/version.m4 2026-05-19 00:14:09.000000000 +0200 @@ -1 +1 @@ -m4_define([VERSION_NUMBER], [1.6.41]) +m4_define([VERSION_NUMBER], [1.6.42])
