Nicholas Clark wrote:
On Sun, Feb 19, 2006 at 07:49:06PM -0500, John E. Malmberg wrote:
Nicholas Clark wrote:
Change 27228 by [EMAIL PROTECTED] on 2006/02/19 18:57:35
To make arithmetic on tainted dualvars work properly requires that
sv_2nv uses SvIVX in preference to SvPVX, if SVp_IOK is true.
Is this test supposed to work on VMS?
I have no idea why it's not. Devel::Peek::Dump or Perl_sv_dump on the
arguments might reveal something that differs from Unix and Win32.
Extracted program:
EAGLE> type [-.t.op]taint.t2
use strict;
use Config;
use File::Spec::Functions;
use Devel::Peek;
my $got_dualvar;
eval 'use Scalar::Util "dualvar"; $got_dualvar++';
# skip "No Scalar::Util::dualvar" unless $got_dualvar;
my $a = Scalar::Util::dualvar(3, $^X);
Dump $a;
print STDERR "a = $a\n";
my $b = $a + 5;
print STDERR "b = $b, should be 8\n";
# is ($b, 8, "Arithmetic on tainted dualvars works");
Run first with out tainting, output looks good:
EAGLE> mcr [-]ndbgperl "-I[-.lib]" [-.t.op]taint.t2
SV = PVNV(0x36d1d8) at 0x2e9788
REFCNT = 1
FLAGS = (PADMY,IOK,POK,pIOK,pPOK)
IV = 3
NV = 0
PV = 0x3121f8 "eagle$dqa0:[project_root.][perl-blead]ndbgperl.exe;3"\0
CUR = 52
LEN = 56
a = eagle$dqa0:[project_root.][perl-blead]ndbgperl.exe;3
b = 8, should be 8
Run a second time with tainting, and fails.
EAGLE> mcr [-]ndbgperl "-T" "-I[-.lib]" [-.t.op]taint.t2
SV = PVMG(0x2c6d00) at 0x2e9740
REFCNT = 1
FLAGS = (PADMY,GMG,SMG,pPOK)
IV = 0
NV = 0
PV = 0x339ce0 "eagle$dqa0:[project_root.][perl-blead]ndbgperl.exe;3"\0
CUR = 52
LEN = 56
MAGIC = 0x2f7850
MG_VIRTUAL = &PL_vtbl_taint
MG_TYPE = PERL_MAGIC_taint(t)
MG_LEN = 1
a = eagle$dqa0:[project_root.][perl-blead]ndbgperl.exe;3
b = 5, should be 8
If Scalar::Util is dynamically loaded, I will have a hard time setting a
breakpoint in it to debug it at C level to see what is going on.
Of course I do not really understand what I am looking at :-)
In addition, the program that creates .C modules from .XS modules is
placing "#line " directives in the .C source. This badly breaks the
OpenVMS debugger, because it does not know how to map the binary code to
the .XS module lines. I need to find out how to get that program to
make those "#line" directives comments on VMS and not preprocessor
directives.
-John
[EMAIL PROTECTED]
Personal Opinion Only