Skip to content

[CRASH] in quicklist violate size limit #12864

Description

@imchuncai

Here is the crash.

    test {boring} {
        r config set list-max-ziplist-size -5
        r lpush lst {*}[split [string repeat "1" 65529] ""]
        set large [string repeat a 65536]
        set i 0
        set k 10
        set l 1
        set patch 2000
        while {$i < 65529} {
            while {$i < $k && $i < 65529} {
                r write "*4\r\n\$4\r\nlset\r\n\$3\r\nlst\r\n\$$l\r\n$i\r\n\$65536\r\n$large\r\n"
                incr i

                if {$i == $patch} {
                    puts $patch
                    set patch [expr {$patch + 2000}]
                }
            }
            set k [expr {$k * 10}]
            incr l
        }

        r flush
        for {set j 0} {$j < 65528} {incr j} {
            assert_equal [r read] {OK}
        }
    }

see issue #12548

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions