Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on assignment to lexical filehandle #7262

Closed
p5pRT opened this issue Apr 23, 2004 · 4 comments
Closed

Crash on assignment to lexical filehandle #7262

p5pRT opened this issue Apr 23, 2004 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 23, 2004

Migrated from rt.perl.org#29102 (status was 'resolved')

Searchable as RT29102$

@p5pRT
Copy link
Author

p5pRT commented Apr 23, 2004

From @gisle

Created by gisle@ask.upc.no

The following program segfaults​:

  foo();
  foo();

  sub foo {
  open(my $fh, ">xxx") || die;
  $fh = "foo";
  }

This is the gdb backtrace​:

  Program received signal SIGSEGV, Segmentation fault.
  0x4207c07c in memmove () from /lib/tls/libc.so.6
  (gdb) bt
  #0 0x4207c07c in memmove () from /lib/tls/libc.so.6
  #1 0x08146e14 in __libc_csu_init ()
  #2 0x080c42c4 in Perl_pp_sassign () at pp_hot.c​:109
  #3 0x080afbf6 in Perl_runops_debug () at dump.c​:1442
  #4 0x08062528 in S_run_body (oldscope=1) at perl.c​:1921
  #5 0x080620b7 in perl_run (my_perl=0x816dba8) at perl.c​:1840
  #6 0x0805e5d1 in main (argc=2, argv=0xbfffe6d4, env=0xbfffe6e0) at perlmain.c​:86
  #7 0x42015704 in __libc_start_main () from /lib/tls/libc.so.6
 

Perl Info

Flags:
    category=core
    severity=high

Site configuration information for perl v5.8.4:

Configured by gisle at Fri Apr 23 14:16:58 MEST 2004.

Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
    osname=linux, osvers=2.4.20-20.9smp, archname=i686-linux
    uname='linux ask 2.4.20-20.9smp #1 smp mon aug 18 11:32:15 edt 2003 i686 i686 i386 gnulinux '
    config_args='-Dprefix=/local/perl/5.8.4-debug -Doptimize=-g -ders'
    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='cc', ccflags ='-DDEBUGGING -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-g',
    cppflags='-DDEBUGGING -fno-strict-aliasing -I/usr/include/gdbm'
    ccversion='', gccversion='3.2.2 20030222 (Red Hat Linux 3.2.2-5)', 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='cc', ldflags =''
    libpth=/lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.3.2'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fpic', lddlflags='-shared'

Locally applied patches:
    


@INC for perl v5.8.4:
    /local/perl/5.8.4-debug/lib/5.8.4/i686-linux
    /local/perl/5.8.4-debug/lib/5.8.4
    /local/perl/5.8.4-debug/lib/site_perl/5.8.4/i686-linux
    /local/perl/5.8.4-debug/lib/site_perl/5.8.4
    /local/perl/5.8.4-debug/lib/site_perl
    .


Environment for perl v5.8.4:
    HOME=/home/gisle
    LANG=en_US.ISO-8859-1
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/gisle/bin:/local/ccache:/local/perl/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
    PERLAPP_LIBC_OK=1
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented May 3, 2004

From @iabyn

On Fri, Apr 23, 2004 at 01​:21​:51PM -0000, Gisle Aas wrote​:

The following program segfaults​:

foo\(\);
foo\(\);

sub foo \{
    open\(my $fh\, ">xxx"\) || die;
    $fh = "foo";
\}

Fixed by change #22746, and test added by change #22778.

Dave.

--
The perl5 internals are a complete mess. It's like Jenga - to get the
perl5 tower taller and do something new you select a block somewhere in
the middle, with trepidation pull it out slowly, and then carefully
balance it somewhere new, hoping the whole edifice won't collapse as a
result.
  - Nicholas Clark, based on an original by Simon Cozens.

@p5pRT
Copy link
Author

p5pRT commented May 3, 2004

The RT System itself - Status changed from 'new' to 'open'

@p5pRT p5pRT closed this as completed May 3, 2004
@p5pRT
Copy link
Author

p5pRT commented May 3, 2004

@iabyn - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant