Fwd: perl debugger+taint mode issue in 5.10.0, 5.10.1 5.12.1, no issue in 5.8.8

2010-08-05 Thread swamy sangamesh
Hi All,

Looks like this is happening  if we have two BEGIN blocks and glob() is
called.
No issue is seen if we have only one BEGIN block.


-- Forwarded message --
From: swamy sangamesh 
Date: Tue, Aug 3, 2010 at 4:59 PM
Subject: perl debugger+taint mode issue in 5.10.0, 5.10.1 5.12.1, no issue
in 5.8.8
To: perl5-port...@perl.org, debugger@perl.org



Hi All,

I got the scenario where perl debugger with taint mode is failing.
I am using below .pm amd .xs file for testing

$ cat *Mytest.pm*
#!/usr/bin/perl -wT
package Mytest;
use XSLoader ();

BEGIN {
XSLoader::load('Mytest');
}
BEGIN {
XSLoader::load('Mytest');
my $var = defined($0)? UNDEFINE : 1;
}

sub func_test {
  glob("check");
  return 1;
}

1;


$ cat *Mytest.xs*
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

#include "ppport.h"
#define UNDEFINE  0

MODULE = Mytest PACKAGE = Mytest

IV
UNDEFINE()
ALIAS:
UNDEFINE = 0
  CODE:
switch(ix) {
  case 0:  RETVAL = UNDEFINE;  break;
}
  OUTPUT:
RETVAL

when i issue perl -dT Mytest.pm getting insecure dependency error.

$ *perl -dT Mytest.pm*

Loading DB routines from perl5db.pl version 1.3
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

*Insecure dependency in eval while running with -T switch at
/usr/lib/perl5/5.10.0/i386-linux-thread-multi/File/Glob.pm line 92*.
Compilation failed in require at Mytest.pm line 34.
 at Mytest.pm line 34
Mytest::BEGIN() called at
/usr/lib/perl5/5.10.0/i386-linux-thread-multi/File/Glob.pm line 34
eval {...} called at
/usr/lib/perl5/5.10.0/i386-linux-thread-multi/File/Glob.pm line 34
BEGIN failed--compilation aborted at Mytest.pm line 34.
 at Mytest.pm line 34
Debugged program terminated.  Use q to quit or R to restart,
  use o inhibit_exit to avoid stopping after program termination,
  h q, h R or h o to get additional info.
  DB<1>


I checked *perl-5.10.0, 5.10.1 and 5.12.1*, issue exists in these release
and seems to be common in all platfrom, as i tested it in aix and linux.
Not seeing any error message in perl-5.8.8. Not sure about 5.9  releases.

Is this a regression which caused this issue? i thought
http://rt.perl.org/rt3/Ticket/Display.html?id=39733 might have caused this
But testing after backing out the changes  also got same error.
Please let me know your suggestions.
-- 
Thanks & Regards,
Sangamesh




-- 
Thanks & Regards,
Sangamesh


perl debugger+taint mode issue in 5.10.0, 5.10.1 5.12.1, no issue in 5.8.8

2010-08-03 Thread swamy sangamesh
Hi All,

I got the scenario where perl debugger with taint mode is failing.
I am using below .pm amd .xs file for testing

$ cat *Mytest.pm*
#!/usr/bin/perl -wT
package Mytest;
use XSLoader ();

BEGIN {
XSLoader::load('Mytest');
}
BEGIN {
XSLoader::load('Mytest');
my $var = defined($0)? UNDEFINE : 1;
}

sub func_test {
  glob("check");
  return 1;
}

1;


$ cat *Mytest.xs*
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

#include "ppport.h"
#define UNDEFINE  0

MODULE = Mytest PACKAGE = Mytest

IV
UNDEFINE()
ALIAS:
UNDEFINE = 0
  CODE:
switch(ix) {
  case 0:  RETVAL = UNDEFINE;  break;
}
  OUTPUT:
RETVAL

when i issue perl -dT Mytest.pm getting insecure dependency error.

$ *perl -dT Mytest.pm*

Loading DB routines from perl5db.pl version 1.3
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

*Insecure dependency in eval while running with -T switch at
/usr/lib/perl5/5.10.0/i386-linux-thread-multi/File/Glob.pm line 92*.
Compilation failed in require at Mytest.pm line 34.
 at Mytest.pm line 34
Mytest::BEGIN() called at
/usr/lib/perl5/5.10.0/i386-linux-thread-multi/File/Glob.pm line 34
eval {...} called at
/usr/lib/perl5/5.10.0/i386-linux-thread-multi/File/Glob.pm line 34
BEGIN failed--compilation aborted at Mytest.pm line 34.
 at Mytest.pm line 34
Debugged program terminated.  Use q to quit or R to restart,
  use o inhibit_exit to avoid stopping after program termination,
  h q, h R or h o to get additional info.
  DB<1>


I checked *perl-5.10.0, 5.10.1 and 5.12.1*, issue exists in these release
and seems to be common in all platfrom, as i tested it in aix and linux.
Not seeing any error message in perl-5.8.8. Not sure about 5.9  releases.

Is this a regression which caused this issue? i thought
http://rt.perl.org/rt3/Ticket/Display.html?id=39733 might have caused this
But testing after backing out the changes  also got same error.
Please let me know your suggestions.
-- 
Thanks & Regards,
Sangamesh