Muhammad Moinur Rahman 9e4efe5e51
databases/valkey: Runtime crash fix
Bug fix: reset io_last_written on c->buf resize to prevent stale
pointers.
Fixes an assert crash in _writeToClient():

serverAssert(c->io_last_written.data_len == 0 ||
             c->io_last_written.buf == c->buf);

The issue occurs when clientsCronResizeOutputBuffer() grows or
reallocates c->buf while io_last_written still points to the old buffer
and data_len is non-zero. On the next write, both conditions in the
assertion become false.

Reset io_last_written when resizing the output buffer to prevent stale
pointers and keep state consistent.

PR:		290758
Reported by:	chris@cretaforce.gr
2025-11-02 22:47:17 +01:00
..
2025-11-02 22:47:17 +01:00
2025-11-02 22:47:17 +01:00