Skip Menu |
 

This queue is for tickets about the Devel-Declare CPAN distribution.

Report information
The Basics
Id: 83966
Status: new
Priority: 0/
Queue: Devel-Declare

People
Owner: Nobody in particular
Requestors: zefram [...] fysh.org
Cc:
AdminCc:

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



Subject: clash with qr/(?{})/ in 5.17.1+
Date: Fri, 15 Mar 2013 10:29:53 +0000
To: bug-Devel-Declare [...] rt.cpan.org
From: Zefram <zefram [...] fysh.org>
Download (untitled) / with headers
text/plain 707b
In perl 5.17.1 and higher, if a /(?{})/ construct is compiled while Devel::Declare is loaded, DD's block hook gets invoked with PL_linestr being the contents of the regexp as it is being parsed, and when it reallocates the SV buffer to accommodate DD insertions this invalidates pointers that the regexp compiler has into the buffer. Results in memory corruption; various failure modes I've seen include getting garbage in the regexp and attempting to allocate more memory than is possible. Workaround is to limit the PL_linestr reallocation to normal code parsing. Unfortunate side effect is that DDed syntax can't be used inside /(?{})/, but that's not an appalling imposition. Patch attached. -zefram
Download re_eval.patch
text/x-diff 836b

Message body is not shown because sender requested not to inline it.



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.