Modify

Opened 3 years ago

Last modified 3 years ago

#18101 new defect

perl from BB 14.07 cannot use negative array indexes

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Barrier Breaker 14.07
Keywords: perl array index Cc: naoir@…

Description

perl from BB 14.07 package repository is broken as it cannot use negative array indexes. Because of this XSLoader.pm cannot find object modules.

Proove:
#!/usr/bin/perl -w

@data = ("element0");
print "$#data\n";
print "$data[0]\n";
print "$data[-1]\n";

gives:
0
element0
Use of uninitialized value $data[255] in concatenation (.) or string at ./test.pl line 6.

This is with openwrt-mpc85xx-generic-tl-wdr4900-v1-squashfs.
Same source for perl 5.20.0 works fine when compiled for my linux.

Attachments (1)

0001-perl-Make-I8-I16-I32-types-explicitly-signed-for-PPC.patch (1.0 KB) - added by Naoir 3 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 3 years ago by Naoir

Thanks for your report.

Looks much like the same problem ARM had a while ago to me(fixed in a199373, for reference). The attached patch should fix the problem. Can you confirm that?

comment:2 Changed 3 years ago by anonymous

Yes, with the patch applied the new perl binary works fine with negative array indices. Great job. Thanks.

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.