Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DAA5E200BFA for ; Thu, 12 Jan 2017 18:02:19 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D7A91160B40; Thu, 12 Jan 2017 17:02:19 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2D46E160B29 for ; Thu, 12 Jan 2017 18:02:19 +0100 (CET) Received: (qmail 11570 invoked by uid 500); 12 Jan 2017 17:02:18 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 11557 invoked by uid 99); 12 Jan 2017 17:02:18 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jan 2017 17:02:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id AB0A0180BA9 for ; Thu, 12 Jan 2017 17:02:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.499 X-Spam-Level: X-Spam-Status: No, score=0.499 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=rowe-clan-net.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id kgl1WrKbONyI for ; Thu, 12 Jan 2017 17:02:15 +0000 (UTC) Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id D57EE5FBBB for ; Thu, 12 Jan 2017 17:02:14 +0000 (UTC) Received: by mail-io0-f173.google.com with SMTP id j18so23175798ioe.2 for ; Thu, 12 Jan 2017 09:02:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rowe-clan-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=rnfDxv5z0iElIQL3uNGNb0zIiJcYK7o4b+ku76UbYfc=; b=s8nyKQDzuHt16TKJxfJdJX4Pq5XHHwWfeqyINVDCvS+ImBQKKauRgiYOd6cGlm5Czd tVt37svF0rr5I4+TH9PGjqXUrAaWgDXQOgbiNzR5/EUaKZjnhoFYgq6uOluP/J3UqzAG 8W93lTgNHP/gl12j/BdHm6GynQMsoEknwV7+/lPIZxgLxipAAqLVseXSpVqlExt33xV2 lZD6DXvlMFOVKukFDHH5Bl2omREbxgEJEBx7MwLKVDnAsyPRdKzwnhQHB7kajRE078Ty 9yNxGj5SD87PrS416q/tLfFu6vsB7MVPguqdVAYL3lgMiEM1Ih+wHm9cFjSMHGix75NK IRuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=rnfDxv5z0iElIQL3uNGNb0zIiJcYK7o4b+ku76UbYfc=; b=h6I8Xc9J7sR4zteLlcEe9ZRJYtCLcSdVOrw4dNUX1SL+Lxyf5fQNiNRmSvfrOiII1K 9dYvtwcudOuHrC4GyPth8NlVH2ur9Hsn4+n5gWD4rKOoMGdROG+xo/qIYHLB94yzVMD4 BIDN7OnSWqrWqMFK591h8yzxn+Ltgd28xw+tY5r0CnSLEUy14N9OeyM2FCGOnlSclvFN CxS/0XWXbrUV5gbFjouWafed4bLlFasp4ysafjGVTbUoWja7nIWfGLxF+ZhUS/Yl2ASJ HxpO6ECxbmdh4Wjx5P5a1K0oXp5JR8pC7QCM+2amNv7HvL04j5p+p/MjAAlnvrQBBjzH CzOQ== X-Gm-Message-State: AIkVDXJve2VkYpWuDLzH7nkOVqCK+6DAWsA68V/zkTSgRuzZSBd6RLt0Z7yYrwNdKZKnk5eZ3+BY+9du/09uOqjS X-Received: by 10.107.158.143 with SMTP id h137mr13129415ioe.43.1484240530575; Thu, 12 Jan 2017 09:02:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.11.35 with HTTP; Thu, 12 Jan 2017 09:02:09 -0800 (PST) In-Reply-To: References: <20170109161253.AC3363A0634@svn01-us-west.apache.org> From: William A Rowe Jr Date: Thu, 12 Jan 2017 11:02:09 -0600 Message-ID: Subject: Re: svn commit: r1778004 - /httpd/httpd/branches/2.4.x/STATUS To: httpd Content-Type: text/plain; charset=UTF-8 archived-at: Thu, 12 Jan 2017 17:02:20 -0000 On Thu, Jan 12, 2017 at 10:54 AM, Yann Ylavic wrote: > On Thu, Jan 12, 2017 at 5:32 PM, William A Rowe Jr wrote: >>> >>> + So the only fix allowing us to use PCRE 10 in httpd 2.4 would be to write >>> + this as a thread safe storage buffer for the majority of cases (<10 $args) >>> + and we don't have a portable tls mechanism to do so. > > Don't we, apr_threadkey_private_*()? Which in turn... requires the apr_pool_t * all over again, so not really; https://apr.apache.org/docs/apr/2.0/group__apr__thread__proc.html#gacb9553b2b3165388bfc0a54b1148804a >> Does anyone have a good suggestion on this that would be back-portable >> and threadsafe for 2.4, before I surrender and make the trunk-only change >> to include the worker's/thread's pool for this reusable buffer tagged with a >> pooldata(m) in a new apr_pool_t * passed to the ap_regexec[_len] functions? > > Maybe having the match_data in a TLS created with a reasonable size > (i.e. 50) on the first use? For our purposes, I think the generic buffer of 10 ($0-$9) for most cases is probably sufficient. But if folks like the idea (and consider that TLS may be supporting almost 2k worker threads on an MPM like win32) perhaps we use a quadratic reallocator, to leap from 10 to 40 to 160 or something like that? But I would expect some 160 args to be a defective config or malicious .htaccess exploit. Our API isn't suited to named args, etc. At some point, a richer API might want a bigger default. But allocating and freeing (or using a pool based alternate allocator, with no requirement to 'free()') may be the most efficient way to handle excessively long ovectors.