libvmod-re2:7edfb217be80811e7cb222bbbce413f8e271392a commitshttps://code.uplex.de/uplex-varnish/libvmod-re2/commits/7edfb217be80811e7cb222bbbce413f8e271392a2021-04-22T08:52:18Zhttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/7edfb217be80811e7cb222bbbce413f8e271392aExplicitly return NULL when it's a pointer (even though 0 works).2021-04-22T08:52:18ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/1ccec57c07ddebddbf5db2f3749a6f59f4d06773Add the .subroutine() method.2021-04-21T20:48:09ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/ce05494edda882dd741cafbdec7065677df3987aDelte some commented-out test code.2021-04-21T19:23:25ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/a7ebf4d69fae06279a6fd11bbddd80e5978b2874vtc tests mostly without .compile().2021-04-21T18:56:19ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/c3f66757813d18c5c9e045e5cce17adf791be6aeSet compilation is now done by vcl_init PRIV_TASK fini.2021-04-21T18:32:56ZGeoff Simmonsgeoff@uplex.de
.compile() is still legal, but unnecessary and will be deprecated.https://code.uplex.de/uplex-varnish/libvmod-re2/commit/3fc87c749853d1367be7172fef4f82ae71b47450.gitignore rpm and tarball artifacts.2021-04-20T19:42:00ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/c70e410a8a152453bd428278dca9ad9045bf4ebdBreaking changes to invoke VCL failure for "can't happen" errors.2021-04-20T19:26:40ZGeoff Simmonsgeoff@uplex.de
Up to now we have emitted sentinel values for this class of errors,
a relic of the time before VCL failure was introduced, when the VMOD
was first developed. This may lead to fatal errors going unnoticed.
These are the sorts of errors that should fail fast in development
and testing, and never make it into production.
We were already using VCL failure for the integer() method, since
there is no sentinel integer.
VCL failure is now invoked for these errors:
- any regex compilation failure
- all out of workspace errors
- compile() or add() called in any VCL subroutine besides vcl_init
- match() called for a set that was not compiled
- failures reported by the RE2 lib for: match(), backref(),
namedref(), the rewrite operations (sub, suball and extract),
cost(), quotemeta()
- numeric index reference for a set object (n parameter) that is out
of range (greater than the number of patterns in the set)
- functions and methods that require a previous successful match
operation (with information stored in priv_task) when there was no
prior match, or the previous macth failed.
- use of select=UNIQUE when more than one pattern in a set matched
- numeric (by index) or "associative" (after match) retrieval of an
object for a set when no such object was saved in the constructor:
strings, backends, regexen, etc
- any of the following are undefined (NULL): fallbacks; patterns for
regex functions (which are compiled at runtime); the text and
rewrite parameters for the rewrite operations; name parameter
for namedrefs
- also if the named parameter for namedrefs is the empty string
- backref number out of range (greater than the number of backrefs)
- backref or namedref attempted without a prior match
- backref or namedref when never_capture=true in the contructor
- low-level failures reported by RE2 (eg cannot determine the number
of backref groups). Most of these are possible, since the call
returns an error status, but I have never seen them happen.
VTC tests have been revised for the new error handling, which changes
quite a bit in this commit.
While we're here, use backend None in the tests where appropriate.
Note that "bad_ip" backends are still necessary to test methods and
functions that retrieve backends (numeric or associative references
for sets).
Error reporting is now done with VCL_fail(), so we get rid of the
errmsg() function, and with it the re2.c source (since that was all
there was in re2.c).https://code.uplex.de/uplex-varnish/libvmod-re2/commit/07cbe881a9d3f444520ad21f948b25fadcd78472Do not access ctx->handling2021-02-10T11:38:01ZNils Gorollnils.goroll@uplex.de
use VRT_Fail() instead
This change should be improved by refactoring error handlinghttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/074e8014766f01a802f4e62b606e8bf98c704c42assert vre2set_fini success2021-02-10T11:28:51ZNils Gorollnils.goroll@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/dddaf3cf9cabbaea951fde5b41a12d2e6eb1a77drefactor enum handling2021-02-10T11:28:51ZNils Gorollnils.goroll@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/f343aa7542345582c63aed4bb950b34d0adb7226includes cleanup2021-02-10T11:28:51ZNils Gorollnils.goroll@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/c4ab47a7568988336f984648a3082bfdf0f2fd64Update signature of task_match fini (changed in Varnish).2021-01-28T14:24:33ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/7542fa6c350ee9aff760d4c9bf1aa376552ca17fUpdate REQUIREMENTS docs.2020-12-30T21:31:28ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/570a6c8d5e875b5ddf5a94b1590dbf054ace0f27adjust to vmod_priv methods2020-12-09T18:49:43ZNils Gorollnils.goroll@uplex.de
Ref:
<a href="https://github.com/varnishcache/varnish-cache/commit/681c11998ec56dc4460a30585210f95a7850ea3b" rel="nofollow noreferrer noopener" target="_blank">https://github.com/varnishcache/varnish-cache/commit/681c11998ec56dc4460a30585210f95a7850ea3b</a>https://code.uplex.de/uplex-varnish/libvmod-re2/commit/a8d74646966f6eb64498ed3ad52272e1d26636ebAdjust to changed WS_* interface.2020-09-01T12:56:11ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/51f9d6e597e47e65d29cda21cce66288cd014697Update re2 compatibility statement (through 2020-08-01).2020-08-13T08:03:51ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/b263b8cfe3dfb86d546de5aba6486ab9bc60f788Retire README.rst, use pandoc to generate README.md.2020-08-12T09:51:21ZGeoff Simmonsgeoff@uplex.de
The rst source has apparently become too large for gitlab web sites
to be able to render it. So we just go with markdown, in the hopes
that gitlab can better cope with it.
It's not an error if you don't have pandoc installed, but then
README will not be kept up to date with the docs in vcc.https://code.uplex.de/uplex-varnish/libvmod-re2/commit/3e94935f40423e7f90dddb076cbfc7a339ac10caFix tests that fail for recent linre2 versions.2020-08-12T09:23:25ZGeoff Simmonsgeoff@uplex.de
Since 2020-06-01, backrefs fail if numbered higher than the highest
backref actually captured- Previously, re2 returned the empty string.
I believe that these tests will now pass for both current and earlier
versions.https://code.uplex.de/uplex-varnish/libvmod-re2/commit/d08429841aa58cd572670b21da10d6ff74ec96edTest that backend None works2019-12-10T11:50:29ZNils Gorollnils.goroll@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/2d465b13769f947401a48d8f3544156cec85b750add some vcl which _almost_ works for removing elements from headers2019-11-13T17:30:59ZNils Gorollnils.goroll@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/8dbfc85ce690ddd7aaeeed7e21e7484c78517bf5Add autotool support for generating coverage reports.2019-10-31T10:11:20ZGeoff Simmonsgeoff@uplex.de
configure checks if you have lcov & genhtml; these can be specified
with --with-lcov and/or --with-genhtml.
If they are available, then make coverage does the following:
- make clean, then make check with CC=gcc & CXX=g++, and CFLAGS &&
CXXFLAGS set so that inputs for gcov/lcov are generated.
- lcov creates the src/coverage subdir and generates a targetfile
there.
- genhtml generates HTML reports in src/coverage.https://code.uplex.de/uplex-varnish/libvmod-re2/commit/5c259a918c0299d86ebf761db636991dc1defaafUpdate README due to internal rst changes.2019-10-08T15:57:30ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/07d677aa3f498a943381208054ed87c0e0f425d3Add set.hdr_filter().2019-08-29T21:09:58ZGeoff Simmonsgeoff@uplex.de
This necessitates adding the matchonly() method to the vre2set
interface, which only checks for matches, and does not save the
indices of matching elements. It also requires a length parameter
(since headers in struct http are not null-terminated).
It also requires the return of the configure-time check for whether
the RE2::Set::Match() method can be called with a NULL vector for
the indices.https://code.uplex.de/uplex-varnish/libvmod-re2/commit/c7e8f60a4a1b6aac7f1ab5b3832902049bfaf299Add the integer parameter to set.add(), and the set.integer() method.2019-08-23T11:57:27ZGeoff Simmonsgeoff@uplex.de
Also update set.saved(), to enable checking if an integer was saved.https://code.uplex.de/uplex-varnish/libvmod-re2/commit/b8a93178869f413a0b653ed95d92d143f5c90e37Add some advice about using gdb to CONTRIBUTING.2019-08-22T15:06:45ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/2fe2188314cd13c6697d1272254c36184e69bcd5Update docs concerning the out-of-memory error for set matches.2019-06-25T13:01:15ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/de726e751e716593c3c7132fdeced5cef66d472dRemove the DFA out-of-memory tests for sets.2019-06-25T12:44:15ZGeoff Simmonsgeoff@uplex.de
re2 no longer does that since commit
848dfb7e1d7ba641d598cb66f81590f3999a555a.https://code.uplex.de/uplex-varnish/libvmod-re2/commit/16ada9ed7cdb6417458b5e3882d443c1c5521da9Update installation instructions for RPMs.2019-04-16T13:32:19ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/550ea36746b19cb46e44a424abb6cc74cd8ea5daUpdate REQUIREMENTS.2019-04-16T13:29:43ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/a5e1865a026d3fdebc2790ced1930f78c55220c7change WS_Reserve2019-04-15T15:16:22ZNils Gorollnils.goroll@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/c9bf65340ad08e87aa24a57ae5f9d2a78014a385fix forgotten WS_Release() calls for failing WS_Reserve()2019-04-07T13:01:57ZNils Gorollnils.goroll@uplex.de
This should hopefully fix a panic which has to be caused by forgotten
WS_Release() calls and which occurred close to VCL code which handles
re2 sets.
Redacted panic:
Panic at: Fri, 05 Apr 2019 19:15:24 GMT
Assert error in WS_Reserve(), cache/cache_ws.c line 236:
Condition(ws->r == NULL) not true.
version = varnish-trunk revision af2bad23deb2470533158f9d99ad3f4968b8d231, vrt api = 9.0
ident = Linux,3.13.0-137-generic,x86_64,-junix,-smalloc,-sdefault,-hcritbit,epoll
now = 3999664.335146 (mono), 1554491669.714933 (real)
Backtrace:
0x43c1bb: /usr/sbin/varnishd() [0x43c1bb]
0x49e182: /usr/sbin/varnishd(VAS_Fail+0x42) [0x49e182]
0x45d1ac: /usr/sbin/varnishd() [0x45d1ac]
0x44d792: /usr/sbin/varnishd(VRT_String+0x22) [0x44d792]
0x44de66: /usr/sbin/varnishd(VRT_SetHdr+0xf6) [0x44de66]
...(redacted for customer proprietary information)
See also <a href="https://github.com/varnishcache/varnish-cache/issues/2967" rel="nofollow noreferrer noopener" target="_blank">https://github.com/varnishcache/varnish-cache/issues/2967</a>
for a general discussion regarding an inconsistency in the WS_Reserve()
interfacehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/5e9690dd59f6736ccada9c2b1697280440845fd9Declare std::string in C++ code, since re2.h has stopped doing so.2019-03-18T15:43:39ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/1af824d40fbe308afe13b17f7c2c8f358c03fbfeBack to trunk.2019-03-18T15:43:21ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/dd95dca91c60d4acb412ff2f35da81639fdf4b20Use VRT_fail() for failures in vcl_init, as now required by Varnish.2019-03-07T15:57:54ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/e5466e9831447115c2dfc30cf5e0b585284680c0adjust to vmodtool changes in master2019-02-05T11:48:02ZNils Gorollnils.goroll@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/7f0cf6fe492f8cfcd7e7c7b563ad31ef18c08e6cdocumentation auto-update from vmodtool change2019-02-05T11:48:02ZNils Gorollnils.goroll@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/3e08d60e36b71d30398a5a7799b9fa2ccea1fbadAdjust to new event function default name in varnish-cache master2019-02-02T14:05:36ZNils Gorollnils.goroll@uplex.de
Ref d8ae26b5a0b4a1102360a61a145e4730e52d68bchttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/219a30aceb7202f4bd651aa3da0d564bfb6287a4documentation auto-update from vmodtool change2019-02-02T14:05:30ZNils Gorollnils.goroll@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/87da251a3d2cd50a680f236e1889fb81d2248536Version 1.6.1, packages for VRT 8 (Varnish 6.1 & libvarnish.so.2).2018-12-03T10:05:45ZGeoff Simmonsgeoff@uplex.dehttps://code.uplex.de/uplex-varnish/libvmod-re2/commit/009612331433946f8120041b1a8811c1220167d4Update REQUIREMENTS statement in the docs.2018-12-03T09:45:21ZGeoff Simmonsgeoff@uplex.de