Subject: | bug/segmentation fault on ia64 (altix) |
Hello,
First I'd like to thank you for this very nice and useful package.
The hardwire function causes a segmentation fault on ia64 architecture (ALTIX itanium with 16 procs running a Suse linux) with perl 5.8.6.
I think I fixed the problem, the problem was that a pointer does not fit on an unsigned int on that architecture. Furthermore the address was stored in a rV rather than in a iV. Here's the patch for Mmap.xs
--- Mmap.xs 2003-12-15 11:08:21.000000000 +0100
+++ ../Mmap.xs.fixed 2005-11-17 18:28:50.829053839 +0100
@@ -125,7 +125,7 @@
SV *
hardwire(var, addr, len)
SV * var
- unsigned int addr
+ IV addr
size_t len
PROTOTYPE: $$$
CODE:
@@ -194,7 +194,7 @@
SvCUR_set(var, len);
SvLEN_set(var, slop);
SvPOK_only(var);
- ST(0) = sv_2mortal(newSVnv((int) addr));
+ ST(0) = sv_2mortal(newSViv((IV) addr));
SV *
munmap(var)
I hope that you'll find it useful.
Thanks again
bye
Karl Forner