Bug#570670: probably a problem with alpha arch

Niko Tyni ntyni at debian.org
Sat Mar 20 21:52:37 UTC 2010


tag 570670 patch
thanks

On Sat, Mar 13, 2010 at 12:48:13AM +0100, gregor herrmann wrote:
> On Fri, 12 Mar 2010 22:10:36 +0100, Jozef Kutej wrote:
> 
> > the package builds find on i386 and amd64. In CPAN there is one similar
> > smoketesting test for alpha arch:
> 
> In Debian it fails on alpha and ia64, so something seems fishy:
> 
> https://buildd.debian.org/pkg.cgi?pkg=libunicode-map8-perl
> https://buildd.debian.org/status/package.php?p=libunicode-map8-perl

Here's the backtrace on ia64 (merulo.d.o):

zsh: segmentation fault (core dumped)  PERL_DL_NONLAZY=1 perl -Iblib/lib -Iblib/arch t/map8.t

Core was generated by `perl -Iblib/lib -Iblib/arch t/map8.t'.
Program terminated with signal 11, Segmentation fault.
#0  0x20000000062f5220 in XS_Unicode__Map8_recode8 (my_perl=0x6000000000004010, cv=0x6000000000074260)
    at Map8.xs:359
359         res[rlen] = '\0';
(gdb) bt
#0  0x20000000062f5220 in XS_Unicode__Map8_recode8 (my_perl=0x6000000000004010, cv=0x6000000000074260)
    at Map8.xs:359
#1  0x20000000001d2be0 in Perl_pp_entersub (my_perl=0x6000000000004010) at pp_hot.c:2888
#2  0x20000000001cef00 in Perl_runops_standard (my_perl=0x6000000000004010) at run.c:40
#3  0x20000000000e8d60 in S_run_body (my_perl=<value optimized out>) at perl.c:2431
#4  perl_run (my_perl=<value optimized out>) at perl.c:2349
#5  0x4000000000001290 in main (argc=Cannot access memory at address 0xc00000000001b516
) at perlmain.c:117

Looks like the problem is that sizeof(STRLEN) != sizeof(int) but
the map8_recode8() call on Map8.xs:358 mixes up pointers to them.

Also, there seems to be a typo in the function prototype in map8.h so
we don't even get a compiler warning. With that fixed, I see

Map8.xs: In function ‘XS_Unicode__Map8_recode8’:
Map8.xs:358: warning: passing argument 6 of ‘map8_recode8’ from incompatible pointer type
map8.h:83: note: expected ‘int *’ but argument is of type ‘STRLEN *’

I'm attaching a patch that makes the test pass for me on ia64.

FWIW, this is also [rt.cpan.org #43404] (which contains an identical
patch to mine) and [rt.cpan.org #24652].

It has also failed on amd64 for at least Fedora, see 
 https://bugzilla.redhat.com/show_bug.cgi?id=182514 
-- 
Niko Tyni   ntyni at debian.org


More information about the pkg-perl-maintainers mailing list