Skip Menu |
 

This queue is for tickets about the Carp-Always CPAN distribution.

Report information
The Basics
Id: 96561
Status: resolved
Priority: 0/
Queue: Carp-Always

People
Owner: Nobody in particular
Requestors: Robert.Rothenberg [...] foxtons.co.uk
Cc:
AdminCc:

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



MIME-Version: 1.0
Content-ID: <F52D49A13931684883BBDC0D0137A019 [...] foxtons.co.uk>
X-Spam-Flag: NO
content-type: text/plain; charset="utf-8"
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -2.6
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 3F9E22409AC for <cpan-bug+Carp-Always [...] hipster.bestpractical.com>; Thu, 19 Jun 2014 09:39:45 -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 sTh9HWgJMBUE for <cpan-bug+Carp-Always [...] hipster.bestpractical.com>; Thu, 19 Jun 2014 09:39:43 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 8A589240329 for <bug-Carp-Always [...] rt.cpan.org>; Thu, 19 Jun 2014 09:39:43 -0400 (EDT)
Received: (qmail 2174 invoked by alias); 19 Jun 2014 13:39:41 -0000
Received: from mail1.bemta3.messagelabs.com (HELO mail1.bemta3.messagelabs.com) (195.245.230.165) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 19 Jun 2014 06:39:34 -0700
Received: from [85.158.137.99:28440] by server-5.bemta-3.messagelabs.com id C9/6A-18761-018E2A35; Thu, 19 Jun 2014 13:39:28 +0000
Received: (qmail 32547 invoked from network); 19 Jun 2014 13:39:28 -0000
Received: from unknown (HELO FXTIMSVAOUT.foxtons.co.uk) (213.152.224.226) by server-3.tower-217.messagelabs.com with DHE-RSA-AES256-SHA encrypted SMTP; 19 Jun 2014 13:39:28 -0000
Received: from FXTIMSVAOUT.foxtons.co.uk (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 404C514803F for <bug-Carp-Always [...] rt.cpan.org>; Thu, 19 Jun 2014 14:39:28 +0100 (BST)
Received: from FXTEXCAS02.foxtons.co.uk (unknown [172.16.0.153]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by FXTIMSVAOUT.foxtons.co.uk (Postfix) with ESMTPS id 300B714803B for <bug-Carp-Always [...] rt.cpan.org>; Thu, 19 Jun 2014 14:39:28 +0100 (BST)
Received: from FXTEXMBX01.foxtons.co.uk ([fe80::35bf:f926:8263:a4eb]) by FXTEXCAS02.foxtons.co.uk ([fe80::822:811c:b306:eded%11]) with mapi id 14.03.0146.000; Thu, 19 Jun 2014 14:39:27 +0100
Delivered-To: cpan-bug+Carp-Always [...] hipster.bestpractical.com
Subject: Regex is too greedy
X-MSG-Ref: server-3.tower-217.messagelabs.com!1403185168!17209229!1
Thread-Index: AQHPi8Pj6dm71EpgBkmki2WWDAGz5w==
X-Spam-Check-BY: la.mx.develooper.com
Date: Thu, 19 Jun 2014 13:39:27 +0000
X-Starscan-Version: 6.11.3; banners=foxtons.co.uk,-,-
X-Spam-Level:
X-Viruschecked: Checked
To: "bug-Carp-Always [...] rt.cpan.org" <bug-Carp-Always [...] rt.cpan.org>
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-2.6 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=ham
Content-Language: en-US
Message-ID: <53A2E80B.3030004 [...] foxtons.co.uk>
X-Env-Sender: Robert.Rothenberg [...] foxtons.co.uk
X-MS-Tnef-Correlator:
Return-Path: <Robert.Rothenberg [...] foxtons.co.uk>
X-Starscan-Received:
X-Original-To: cpan-bug+Carp-Always [...] hipster.bestpractical.com
X-RT-Mail-Extension: carp-always
Thread-Topic: Regex is too greedy
X-MS-Has-Attach:
X-Originating-Ip: [213.152.224.226]
X-Originating-Ip: [172.20.206.26]
Accept-Language: en-GB, en-US
From: Robert Rothenberg <Robert.Rothenberg [...] foxtons.co.uk>
X-RT-Original-Encoding: iso-8859-1
X-RT-Interface: Email
Content-Length: 1207
Download (untitled) / with headers
text/plain 1.1k
The regular expression $arg =~ s/(.*)( at .*? line .*?\n$)/$1/s; is too greedy. If you have an error like Kaboom at foo/bar.pl line 123 Some additional diagnostics added here by a custom error handler. then the additional diagnostics added will be lost. Try changing the regex to $arg =~ s/(.*)( at .*? line \d+\n$)/$1/s; Privacy and Confidentiality Notice: This is strictly confidential and intended solely for the person or organisation to whom it is addressed. It may contain privileged and confidential information and if you are not an intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this message in error, please notify us as soon as possible and delete it and any attached files from your system. The views and opinions expressed in this email message are the author's own and may not reflect the views and opinions of the author's employer. Foxtons Limited is registered in England and Wales (registered number 01680058). Our registered office is at Building One, Chiswick Park, 566 Chiswick High Road, London, W4 5BE. Show quoted text
________________________________ This e-mail has been scanned for viruses by MessageLabs.
MIME-Version: 1.0
In-Reply-To: <53A2E80B.3030004 [...] foxtons.co.uk>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <53A2E80B.3030004 [...] foxtons.co.uk>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-948-1534029435-106.96561-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 280
Download (untitled) / with headers
text/plain 280b
Fixed in release 0.16 – https://metacpan.org/release/FERREIRA/Carp-Always-0.16 The regex use was revamped, acting after Carp::longmess() and tuned to suppress the duplicate tracebacks (if any). So the use case you described should be now safe, and has turned into a test case.


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.