develooper Front page | perl.perl5.porters | Postings from August 2010

[perl #76872] perl debugger not working in taint mode

Thread Next
From:
sangamesh M
Date:
August 1, 2010 00:37
Subject:
[perl #76872] perl debugger not working in taint mode
Message ID:
rt-3.6.HEAD-2463-1280580977-1164.76872-75-0@perl.org
# New Ticket Created by  sangamesh M 
# Please include the string:  [perl #76872]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=76872 >


I tried to send report using perlbug tool, but looks like report has not
been sent, hence sending it directly.


Getting Insecure dependency error when used perl debugger with taint mode
/usr/bin/perl -wT . This issue seems to be common in all the platforms as i
tested it in aix and linux. it appears in latest perl also, in perl-5.12.1
and 5.10.0, 5.10.1.
not facing any issue in perl-5.8.8.

Here is the error message:

$ 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>


And content of Mytest.pm and Mytest.xs look like

$ 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

This issue happens when used taint mode in debugger, if we invoke debugger
without taint mode then debugger works fine.
Looks like some drastic changes happened in perl-5.10.0

-- 
Thanks & Regards,
Sangamesh

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About