[master] 91e731c93 vre: Acknowledge that limits aren't reentrant

Nils Goroll nils.goroll at uplex.de
Thu Jun 10 09:39:05 UTC 2021


commit 91e731c931eb091fe7712e382afd0a86f5a5c0a5
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Wed May 19 16:42:03 2021 +0200

    vre: Acknowledge that limits aren't reentrant
    
    We might want to do something about it once pcre2 is in place, but it
    should be noted that concurrent matches on a vre_t could compete over
    the limits we can tweak.
    
    Refs #3559

diff --git a/lib/libvarnish/vre.c b/lib/libvarnish/vre.c
index 5f2a81a72..409c27d96 100644
--- a/lib/libvarnish/vre.c
+++ b/lib/libvarnish/vre.c
@@ -119,6 +119,7 @@ VRE_exec(const vre_t *code, const char *subject, int length,
 	}
 
 	if (lim != NULL) {
+		/* XXX: not reentrant */
 		code->re_extra->match_limit = lim->match;
 		code->re_extra->flags |= PCRE_EXTRA_MATCH_LIMIT;
 		code->re_extra->match_limit_recursion = lim->match_recursion;


More information about the varnish-commit mailing list