Subject: | PadWalker::_upcontext() truncates a pointer to 32 bits |
Hi,
as seen in Debian bug #458195 <http://bugs.debian.org/458195>, the
Devel::Caller module is broken on the Alpha and IA-64 (Itanium)
architectures due to a bug in PadWalker::_upcontext(). The function is
truncating a pointer to 32 bits. Proposed patch attached; this works for
me at least on IA64, x86 and x86_64 (aka. amd64).
As a side note, the function was probably created for Devel::Caller,
judging by the changelog of that module, so this could be reflected in
the _upcontext() comment :)
Thanks for your work on the PadWalker module,
--
Niko Tyni
ntyni@iki.fi
Subject: | padwalker.patch |
--- PadWalker.xs 2007/12/29 13:22:06 1.1
+++ PadWalker.xs 2007/12/29 13:22:16
@@ -534,4 +534,4 @@
PPCODE:
/* I'm not sure why this is here, but I'll leave it in case
* somebody is using it in an insanely evil way. */
- XPUSHs(sv_2mortal(newSViv((U32)upcontext(aTHX_ uplevel, 0, 0, 0, 0))));
+ XPUSHs(sv_2mortal(newSViv((IV)upcontext(aTHX_ uplevel, 0, 0, 0, 0))));