Skip Menu |

This queue is for tickets about the Regexp-Grammars CPAN distribution.

Report information
The Basics
Id: 61459
Status: open
Priority: 0/
Queue: Regexp-Grammars

Owner: Nobody in particular
Requestors: ARODLAND [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Warn about nonreentrant regex engine in the caveats section of POD
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 632
Download (untitled) / with headers
text/plain 632b
This is kind of funny since I'm the one who wrote you asking to have objrule call the class constructor properly, but anyway... I think it would be worth noting in the IMPORTANT CONSTRAINTS AND LIMITATIONS section of the POD that the perl5 regex engine is (so far) non-reentrant -- any code that triggers a regex match inside of (?{ ... }) or (??{ ... }) will lead to weird data corruption and most likely segfaults. In particular this means constructors called by <objrule:>, and in very particular it means Moose constructors under many conditions, like having an attribute with an 'Int' type constraint. Thanks, Andrew
From thoughtstream [...] Sun Sep 19 17: 54:47 2010
MIME-Version: 1.0
X-Spam-Status: No, score=-8.891 tagged_above=-99.9 required=10 tests=[AWL=1.022, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8, SPF_NEUTRAL=0.686] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-24889-1284900405-1976.61459-4-0 [...]>
X-Spam-Flag: NO
References: <RT-Ticket-61459 [...]> <rt-3.8.HEAD-24889-1284900405-1976.61459-4-0 [...]>
X-Virus-Scanned: Debian amavisd-new at
Message-ID: <AANLkTikaoBC+V3mRd7AghBA9J1v-TayQTug41QvyuXVV [...]>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -8.891
Authentication-Results: (amavisd-new); dkim=pass header.i= [...]
Authentication-Results: (amavisd-new); domainkeys=pass header.sender=thoughtstream [...]
Received: from localhost (localhost []) by (Postfix) with ESMTP id 81954240CD8 for <cpan-bug+Regexp-Grammars [...]>; Sun, 19 Sep 2010 17:54:47 -0400 (EDT)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id kmAB3AAeHZIw for <cpan-bug+Regexp-Grammars [...]>; Sun, 19 Sep 2010 17:54:46 -0400 (EDT)
Received: from ( []) by (Postfix) with SMTP id ABE95240BFF for <bug-Regexp-Grammars [...]>; Sun, 19 Sep 2010 17:54:45 -0400 (EDT)
Received: (qmail 26092 invoked by uid 103); 19 Sep 2010 21:57:48 -0000
Received: from ( by with QMQP; 19 Sep 2010 21:57:48 -0000
Received: from (HELO ( by (qpsmtpd/0.80) with ESMTP; Sun, 19 Sep 2010 14:57:46 -0700
Received: by qwb7 with SMTP id 7so2725793qwb.9 for <bug-Regexp-Grammars [...]>; Sun, 19 Sep 2010 14:57:44 -0700 (PDT)
Received: by with SMTP id g25mr5239533qci.196.1284933464093; Sun, 19 Sep 2010 14:57:44 -0700 (PDT)
Received: by with HTTP; Sun, 19 Sep 2010 14:50:02 -0700 (PDT)
Delivered-To: cpan-bug+Regexp-Grammars [...]
Subject: Re: [ #61459] Warn about nonreentrant regex engine in the caveats section of POD
Domainkey-Signature: a=rsa-sha1; c=nofws;; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=huZaQX8xCXYdNXdrA9PjEcO8uEjrZl0grdnRihCQw5NETR62FymPuekp058PULWhqr b2wb0h9ptu2sIXwAa+B5E8ghZEaaUhSx+UEKfEQA05kYC6umXdA/bSuIzlE+LvBlz30C yR41GnpVmp213b0cIvUXx/J5TYbwSKwY2LftI=
Return-Path: <thoughtstream [...]>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=113sj/Lsa8N2PlgT9YztdNnrq4fq+WYZ4q8PnUOaoZ8=; b=OE81jVztpbleI+Bka6fvm1ApBIiDy0248Hb9vm85n/GWo6T7McAsXIAbyFEwpi2N6Y iuuGgjNXbWFuVJ69m39bmRrafJJeJosMfbynqqeFcHmbBf8bCefLHkhL7oXD83WyaorW ApMvpAKq5/WGfOKPdCPdyz33GaQe9Qgy1sRw8=
X-Original-To: cpan-bug+Regexp-Grammars [...]
X-RT-Mail-Extension: regexp-grammars
X-Google-Sender-Auth: 5tihY1NH-crUZJyMb32vwdaQnks
Sender: thoughtstream [...]
Date: Mon, 20 Sep 2010 07:50:02 +1000
To: bug-Regexp-Grammars [...]
From: Damian Conway <damian [...]>
RT-Message-ID: <rt-3.8.HEAD-24874-1284933471-8.61459-0-0 [...]>
Content-Length: 872
Download (untitled) / with headers
text/plain 872b
Thanks, Andrew. I have now adapted your wording to add the following warning at the very top of the "IMPORTANT CONSTRAINTS AND LIMITATIONS" section: The Perl 5 regex engine is not reentrant. So any attempt to perform a regex match inside a C<(?{ ... })> or C<(??{ ... })> will almost certainly lead to either weird data corruption or a segfault. The same calamities can also occur in any constructor called by C<< <objrule:> >>. If the constructor invokes another regex in any way, it will most likely fail catastrophically. In particular, this means that Moose constructors will frequently crash and burn within a Regex::Grammars grammar (for example, if the Moose-based class declares an attribute type constraint such as 'Int', which Moose checks using a regex). Thanks for pointing out this non-obvious corner case. Damian

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to