Hi,

Searching the archives turned up nothing, so here goes:

The following small script causes a segmentation fault for me:

    #! /umsapp/ext/bin/perl

    use POE qw(Component::Client::TCP);

    POE::Component::Client::TCP->new
      ( RemoteAddress => "127.0.0.1",
        RemotePort => 123456,
        ConnectError => sub { die; },
        ServerInput => sub { },
      );

    POE::Kernel->run();

(This assumes no service is running on 127.0.0.1:123456). The output is

    Died at /home/users/kn/devel/trunk/ums0/src/usm/usm.pl line 8.
    Segmentation fault

I am using Perl 5.8.2 on i386 Linux (perl -V output below). The segfault
also occurs with Perl 5.8.3, but it does NOT occur with 5.6.1.

Now I am probably not going to want to use the die in production code,
and anyway since POE is pure-perl this is probably more of a Perl
problem than a POE problem, but I just thought I would mention it. If
anyone think it a good idea I could post the problem to perl-porters.

Any ideas what goes wrong?

A gdb stacktrace gives:

#0  0x080c51ff in Perl_leave_scope ()
#1  0x080c379b in Perl_pop_scope ()
#2  0x0806488e in S_my_exit_jump ()
#3  0x08064731 in Perl_my_failure_exit ()
#4  0x080c860a in Perl_die_where ()
#5  0x080991db in Perl_vdie ()
#6  0x0809926c in Perl_die ()
#7  0x080ce6cc in Perl_pp_die ()
#8  0x080a5c10 in Perl_runops_standard ()
#9  0x08060fd5 in S_run_body ()
#10 0x08060d2e in perl_run ()
#11 0x0805e261 in main ()
#12 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6

Output of perl -V:

Summary of my perl5 (revision 5.0 version 8 subversion 2) configuration:
  Platform:
    osname=linux, osvers=2.4.18-14, archname=i686-linux
    uname='linux murphy 2.4.18-14 #1 wed sep 4 13:35:50 edt 2002 i686 i686 i386 
gnulinux '
    config_args='-Uinstallusrbinperl -Dprefix=/umsapp/ext-Perl58 -Dcc=gcc 
-Doptimize=-O2 -des -Dlocincpth=/umsapp/ext-Perl58/include /usr/local/include 
-Dloclibpth=/umsapp/ext-Perl58/lib /usr/local/lib'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-fno-strict-aliasing -I/umsapp/ext-Perl58/include 
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O2',
    cppflags='-fno-strict-aliasing -I/umsapp/ext-Perl58/include -I/usr/local/include 
-I/usr/include/gdbm'
    ccversion='', gccversion='2.95.3 20010315 (release)', 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, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/umsapp/ext-Perl58/lib -L/usr/local/lib'
    libpth=/umsapp/ext-Perl58/lib /usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.2.93.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.2.93'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/umsapp/ext-Perl58/lib -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES
  Built under linux
  Compiled at Jan  8 2004 11:18:58
  @INC:
    /umsapp/ext-Perl58/lib/perl5/5.8.2/i686-linux
    /umsapp/ext-Perl58/lib/perl5/5.8.2
    /umsapp/ext-Perl58/lib/perl5/site_perl/5.8.2/i686-linux
    /umsapp/ext-Perl58/lib/perl5/site_perl/5.8.2
    /umsapp/ext-Perl58/lib/perl5/site_perl
    .

 - Kristian.

-- 
Kristian Nielsen   [EMAIL PROTECTED]
Development Manager, Sifira A/S

Reply via email to