Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Sys-Mmap CPAN distribution.

Report information
The Basics
Id: 15905
Status: resolved
Priority: 0/
Queue: Sys-Mmap

People
Owner: TODDR [...] cpan.org
Requestors: karl.forner [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.13
Fixed in: 0.13_01



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
This also works for me but with all the patches I've sent in, the patch looks like this now.
Subject: patch.txt
diff --git a/Mmap.xs b/Mmap.xs index c144a52..85fe829 100644 --- a/Mmap.xs +++ b/Mmap.xs @@ -125,7 +125,7 @@ constant(name,arg) SV * hardwire(var, addr, len) SV * var - unsigned int addr + IV addr size_t len PROTOTYPE: $$$ CODE: @@ -194,7 +194,7 @@ mmap(var, len, prot, flags, fh = 0, off = 0) SvCUR_set(var, len); SvLEN_set(var, slop); SvPOK_only(var); - ST(0) = sv_2mortal(newSVnv((int) addr)); + ST(0) = sv_2mortal(newSVnv((IV) addr)); SV * munmap(var)
This has been resolved in 0.13_01