develooper Front page | perl.perl5.porters | Postings from October 2003

Re: How to tell if Perl has -DDEBUGGING?

Thread Previous | Thread Next
From:
Stas Bekman
Date:
October 24, 2003 10:30
Subject:
Re: How to tell if Perl has -DDEBUGGING?
Message ID:
3F996186.9040306@stason.org
Steve Hay wrote:
[...]
> I was looking at the Filter::decrypt module as a means of encrypting 
> source code.  (And I don't want a flame war about the ethics or merits 
> or doing that.)
> 
> The documentation suggests statically linking the Filter::decrypt 
> extension against a non-DEBUGGING Perl.  I don't want to statically link 
> it, but I don't want people (devious miscreants or otherwise) to take 
> the dynamically linked module and slap it into their DEBUGGING Perl and 
> start hacking either.

With non-debug perl:

`nm $Config{archlibexp}/CORE/$Config{libperl}`

usually gives you no symbols if it helps, unless -g flag was used explicitly. 
Something that could be done in Makefile.PL (though it's of course 
non-portable, unless there is a portable perl module that gives you the symbols).

> It occurred to me that if the module knew for sure whether or not the 
> Perl in question was a DEBUGGING Perl then the dynamically linked plan 
> is a little safer.

What happens if your module gets built against a non-DEBUGGING libperl.so, but 
then someone slips in a DEBUGGING libperl.so after the installation?

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Thread Previous | 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