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

People
Owner: Nobody in particular
Requestors: ARODLAND [...] cpan.org
Cc:
AdminCc:

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 [...] gmail.com 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 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-61459 [...] rt.cpan.org> <rt-3.8.HEAD-24889-1284900405-1976.61459-4-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <AANLkTikaoBC+V3mRd7AghBA9J1v-TayQTug41QvyuXVV [...] mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -8.891
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Authentication-Results: hipster.bestpractical.com (amavisd-new); domainkeys=pass header.sender=thoughtstream [...] gmail.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 81954240CD8 for <cpan-bug+Regexp-Grammars [...] hipster.bestpractical.com>; Sun, 19 Sep 2010 17:54:47 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kmAB3AAeHZIw for <cpan-bug+Regexp-Grammars [...] hipster.bestpractical.com>; Sun, 19 Sep 2010 17:54:46 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id ABE95240BFF for <bug-Regexp-Grammars [...] rt.cpan.org>; 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 x16.dev (10.0.100.26) by x1.dev with QMQP; 19 Sep 2010 21:57:48 -0000
Received: from mail-qw0-f50.google.com (HELO mail-qw0-f50.google.com) (209.85.216.50) by 16.mx.develooper.com (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 [...] rt.cpan.org>; Sun, 19 Sep 2010 14:57:44 -0700 (PDT)
Received: by 10.229.65.25 with SMTP id g25mr5239533qci.196.1284933464093; Sun, 19 Sep 2010 14:57:44 -0700 (PDT)
Received: by 10.229.31.76 with HTTP; Sun, 19 Sep 2010 14:50:02 -0700 (PDT)
Delivered-To: cpan-bug+Regexp-Grammars [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #61459] Warn about nonreentrant regex engine in the caveats section of POD
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; 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 [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; 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-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+Regexp-Grammars [...] hipster.bestpractical.com
X-RT-Mail-Extension: regexp-grammars
X-Google-Sender-Auth: 5tihY1NH-crUZJyMb32vwdaQnks
Sender: thoughtstream [...] gmail.com
Date: Mon, 20 Sep 2010 07:50:02 +1000
X-Spam-Level:
To: bug-Regexp-Grammars [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
RT-Message-ID: <rt-3.8.HEAD-24874-1284933471-8.61459-0-0 [...] rt.cpan.org>
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 Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.