New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text::Wrap::wrap() generates a segfault with Cyrillic characters when the utf8 flag is turned on #9266
Comments
From lpsolit@gmail.comAs described at https://bugzilla.mozilla.org/show_bug.cgi?id=423439, Flags: Site configuration information for perl v5.8.8: Configured by Mandriva at Mon Nov 5 17:08:57 EST 2007. Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Locally applied patches: @INC for perl v5.8.8: Environment for perl v5.8.8: PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/root/bin |
From @nwc10On Tue, Mar 25, 2008 at 05:08:10PM -0700, Frdric Buclin wrote:
The bug seems to be caused by a regexp using pos() inside a substitution, and $ cat 52104.pl $_ = chr(0x410) . "N"; s/N/ pos(); "" /e; use Devel::Peek; __END__ It's still present in blead. It's not Cyrillic specific, but I happened to stick I don't know what the cause is. Nicholas Clark |
The RT System itself - Status changed from 'new' to 'open' |
From @nwc10On Wed, Mar 26, 2008 at 12:50:55PM +0000, Nicholas Clark wrote:
It should all be fixed by the appended change, which I expect will be in 5.8.9 Nicholas Clark Change 33580 by nicholas@nicholas-saigo on 2008/03/26 21:05:20 The offset for pos is stored as bytes, and converted to (Unicode) Affected files ... ... //depot/perl/pp_ctl.c#688 edit Differences ... ==== //depot/perl/pp_ctl.c#688 (text) ==== @@ -298,7 +298,6 @@ ==== //depot/perl/t/op/subst.t#50 (xtext) ==== @@ -7,7 +7,7 @@ require './test.pl'; $x = 'foo'; +{ |
From lpsolit@gmail.comFor all installations which do not have the not-yet-released Perl 5.8.9, |
From @nwc10On Thu, Mar 27, 2008 at 10:41:51PM +0100, Frdric Buclin wrote:
Given that the bug means that using pos inside the replacement in s///e isn't For Bugzilla, as it's generating HTML for web pages, if it's not text in <pre> Or is this explicitly for fixed width text, where formatting of tabs at Nicholas Clark |
From Robin.Barker@npl.co.ukFrom: Fr��d��ric Buclin [mailto:lpsolit@gmail.com]
I have rewritten Text::Tabs to avoid s//pos/ Robin sub expand { This e-mail and any attachments may contain confidential and/or NPL Management Ltd cannot guarantee that the e-mail or any NPL Management Ltd. Registered in England and Wales. No: 2937881 |
From @nwc10On Fri, Mar 28, 2008 at 10:58:25PM -0000, Robin Barker wrote:
Although that's not a huge win unless the work around code goes into a Nicholas Clark |
From @ap* Robin Barker <Robin.Barker@npl.co.uk> [2008-03-29 00:00]:
I wrote the version of `expand` with s//pos/e; it is the way it Your version is O(n) too, but if you benchmark it you’ll find it There have been some fixes in Text::Wrap since my performance Regards, |
@smpeters - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#52104 (status was 'resolved')
Searchable as RT52104$
The text was updated successfully, but these errors were encountered: