Skip Menu |

This queue is for tickets about the Text-Reflow CPAN distribution.

Report information
The Basics
Id: 34966
Status: resolved
Priority: 0/
Queue: Text-Reflow

People
Owner: martin [...] gkc.org.uk
Requestors: imacat [...] mail.imacat.idv.tw
Cc:
AdminCc:

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



Subject: Die with Infinite Loop and Out of Memory When "make test"
Dear Martin Ward, Hi. This is imacat from Taiwan. I found that your Text-Reflow-1.05 gets into infinite loop when "make test", which eats up all the memory and dies. I tried to investigate further, but this happens at several places that I cannot get very clear. The terminal log is attached below. Hope that this helps. Please tell me if you need any more information, or if I could be of any help. Thank you. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 8874 imacat 25 0 1237m 1.2g 1708 R 100 61.0 0:23.10 perl imacat@rinse tmp/Text-Reflow-1.05 % perl -v This is perl, v5.8.8 built for x86_64-linux-thread-multi-ld Copyright 1987-2006, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. imacat@rinse tmp/Text-Reflow-1.05 % make test 1..20 ok 1 make: *** [test_dynamic] Interrupt imacat@rinse tmp/Text-Reflow-1.05 %
Should be fixed in version Text-Reflow-1.06
The problem was these lines: @linkbreak = unpack("N*", pack("H*", $result)); @linkbreak = map { $_ + 0 } @linkbreak; On a 32 bit machine this changed the entries from signed to unsigned. On a 64 bit machine, the values in @linkbreak stayed unsigned (and therefore positive), so a later test failed. I change it to: @linkbreak = unpack("N*", pack("H*", $result)); # Convert @linkbreak from unsigned to signed: @linkbreak = map { $_ > 0xF0000000 ? -((0xFFFFFFFF - $_) + 1) : $_ + 0 } @linkbreak; $lastbreak = shift(@linkbreak); which seems to work on both 32 bit and 64 bit machines.