• Martin Blix Grydeland's avatar
    Do not advance the vs->vg pointer unless there was a match · 8bd32359
    Martin Blix Grydeland authored
    The vsm_set vg pointer points to the last matched segment insertion, and
    is used as an optimization when looking for existing entries in the
    list. varnishd guarantees that insertions are always ordered, so there is
    no need to search the preceeding entries on a successful match. When
    parsing an index containg elements that included entries that are added
    and then subsequently removed in a later entry, this pointer would be
    advanced to the very end, failing to match the entries in between when
    parsing the rest of the file.
    
    Fix this mechanism by only updating the pointer on a successful match, and
    also advancing it one step it if the entry it is pointing to is removed.
    
    Note that these types of events are not supposed to be possible, because
    varnishd will when rewriting the index only include the active ones,
    removing any add-then-remove pairs. But if for whatever reason an attempt
    is made to reread a list, with this patch it should not cause problems.
    8bd32359
Name
Last commit
Last update
.github Loading commit data...
bin Loading commit data...
doc Loading commit data...
etc Loading commit data...
include Loading commit data...
lib Loading commit data...
m4 Loading commit data...
man Loading commit data...
tools Loading commit data...
.dir-locals.el Loading commit data...
.gitignore Loading commit data...
.syntastic_c_config Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
README.Packaging Loading commit data...
README.rst Loading commit data...
autogen.des Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
flint.lnt Loading commit data...
varnish-legacy.m4 Loading commit data...
varnish.m4 Loading commit data...
varnishapi-uninstalled.pc.in Loading commit data...
varnishapi.pc.in Loading commit data...