perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [mp1] Segfautl with constant handlers and perl 5.6.x
Date Fri, 06 Jun 2003 23:52:09 GMT
Philippe M. Chiasson wrote:
> I've narrowed down a strange bug I reported a while back.
> 
> Seems that using constant for Perl* directives doesn't quite work for 
> perl 5.6.1 and 5.6.x
> 
> <Location /segv>
>  PerlModule Apache::Constants
>  SetHandler perl-script
>  PerlHandler Apache::OK
> </Location>
> 
> #0  0x0816df79 in ?? ()
> #1  0x400a38c7 in S_call_body (myop=0xbffff240, is_eval=0) at perl.c:1821
> #2  0x400a3514 in perl_call_sv (sv=0x85f12c0, flags=4) at perl.c:1742
> #3  0x08070b19 in perl_call_handler (sv=0x85f12c0, r=0x86eb964, args=0x0) at mod_perl.c:1661
> #4  0x0807004f in perl_run_stacked_handlers (hook=0x80c8527 "PerlHandler", r=0x86eb964,
handlers=0x8612760) at mod_perl.c:1374
> #5  0x0806da98 in perl_handler (r=0x86eb964) at mod_perl.c:897
> #6  0x080984af in ap_invoke_handler (r=0x86eb964) at http_config.c:518
> #7  0x080aca34 in process_request_internal (r=0x86eb964) at http_request.c:1310
> #8  0x080aca93 in ap_process_request (r=0x86eb964) at http_request.c:1326
> #9  0x080a3d52 in child_main (child_num_arg=0) at http_main.c:4653
> #10 0x080a3ef2 in make_child (s=0x80e6de4, slot=0, now=1054716897) at http_main.c:4768
> #11 0x080a4058 in startup_children (number_to_start=5) at http_main.c:4850
> #12 0x080a46f5 in standalone_main (argc=6, argv=0xbffff5b4) at http_main.c:5169
> #13 0x080a4f13 in main (argc=6, argv=0xbffff5b4) at http_main.c:5511
> 
> 
>>svpeek(0x85f12c0)
> 
> PV("Apache::OK"\0)
> 
> and the op being called is quite bogus indeed
> 
>>display (*myop) 
> 
> *myop = {
> 	op_next = 0x0, 
> 	op_sibling = 0x0, 
> 	op_ppaddr = 0,
> 	op_targ = 0,
> 	op_type = 0,
> 	op_seq = 0,
> 	op_flags = 66 'B' (OPf_STACKED|OPf_WANT_SCALAR),
>   	op_private = 0 '\0'
> }
> 
> And I get this error on the following availble perls:
> 
> Perl-5.6.x@19034:
>  5.6.x/devel
>  5.6.x/devel-perlio
>  5.6.x/devel-perlio-shrplib
>  5.6.x/devel-perlio-shrplib-threads
>  5.6.x/devel-perlio-threads
>  5.6.x/devel-shrplib
>  5.6.x/devel-shrplib-threads
>  5.6.x/devel-threads
>  5.6.x/perlio
>  5.6.x/perlio-shrplib
>  5.6.x/perlio-shrplib-threads
>  5.6.x/perlio-threads
>  5.6.x/shrplib
>  5.6.x/shrplib-threads
>  5.6.x/threads
> 
> And Perl 5.6.1 vanilla
>  5.6.1/perlio
>  5.6.1/perlio-shrplib
>  5.6.1/perlio-shrplib-threads
>  5.6.1/perlio-threads
>  5.6.1/shrplib
>  5.6.1/shrplib-threads
>  5.6.1/threads
> 
> 
> Ideas? Anybody can reproduce this simple test case ? Somehow, I suspect it has to do
with the fact
> that Apache::OK isn't a plain sub but a constant, but ???

I have tried these two:

   <Location /foo>
       SetHandler perl-script
       PerlFixupHandler Apache::DECLINED
       PerlHandler +Foo
   </Location>

<Location /segv>
  PerlModule Apache::Constants
  SetHandler perl-script
  PerlHandler Apache::OK
</Location>

Both "work" (no segfault). Want me to try with another perl?

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
   Platform:
     osname=linux, osvers=2.4.19-16mdksmp, archname=i686-linux-thread-multi
     uname='linux hope.stason.org 2.4.19-16mdksmp #1 smp fri sep 20 16:08:37 
cest 2002 i686 unknown unknown gnulinux '
     config_args='-des -Dprefix=/home/stas/perl/5.6.1-ithread -Dusethreads 
-Doptimize=-g -Duseshrplib -Dusedevel'
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define
     useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
     use64bitint=undef use64bitall=undef uselongdouble=undef
   Compiler:
     cc='cc', ccflags ='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
     optimize='-g',
     cppflags='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing'
     ccversion='', gccversion='3.2 (Mandrake Linux 9.0 3.2-1mdk)', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
     alignbytes=4, usemymalloc=n, prototype=define
   Linker and Libraries:
     ld='cc', ldflags =' -L/usr/local/lib'
     libpth=/usr/local/lib /lib /usr/lib
     libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
     perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
     libc=/lib/libc-2.2.5.so, so=so, useshrplib=true, libperl=libperl.so
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic 
-Wl,-rpath,/home/stas/perl/5.6.1-ithread/lib/5.6.1/i686-linux-thread-multi/CORE'
     cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
   Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES 
PERL_IMPLICIT_CONTEXT
   Built under linux
   Compiled at Nov 29 2002 10:11:18
   @INC:
     /home/stas/perl/5.6.1-ithread/lib/5.6.1/i686-linux-thread-multi
     /home/stas/perl/5.6.1-ithread/lib/5.6.1
     /home/stas/perl/5.6.1-ithread/lib/site_perl/5.6.1/i686-linux-thread-multi
     /home/stas/perl/5.6.1-ithread/lib/site_perl/5.6.1
     /home/stas/perl/5.6.1-ithread/lib/site_perl
     .


__________________________________________________________________
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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message