Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.96k stars 555 forks source link

$FORMAT_FORMFEED #5399

Closed p5pRT closed 16 years ago

p5pRT commented 22 years ago

Migrated from rt.perl.org#9114 (status was 'rejected')

Searchable as RT9114$

p5pRT commented 22 years ago

From csmith@vgi.com

Created by csmith@vgi.com

When generating a table\, that will never be printed\, using format it makes sense to not print the form feed character. Setting the $FORMAT_FORMFEED variable to undef rather\, rather than an empty string\, causes a segfault when the format is large enough to need a form feed. Setting the $FORMAT_FORMFEED variable to undef should be equivalent to an empty string rather than generating an obscure segfault that is difficult to trace (Thanks to Glen Dudek for helping me figure it out).

-- Craig Smith

Perl Info ``` Flags: category=core severity=low Site configuration information for perl v5.6.1: Configured by dgg at Wed Aug 1 19:50:45 EDT 2001. Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=solaris, osvers=2.8, archname=sun4-solaris uname='sunos xena 5.8 generic_108528-05 sun4u sparc sunw,ultra-80 ' config_args='-Dcc=gcc -des' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='gcc', ccflags ='-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O', cppflags='-I/usr/local/include' ccversion='', gccversion='2.8.1', gccosandvers='solaris2.7' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib ' libpth=/usr/local/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -lgdbm -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib' Locally applied patches: @INC for perl v5.6.1: /ah/csmith/lib/perl /ah/csmith/lib/perl5/sun4-solaris /ah/csmith/lib/perl5 /usr/local/lib/perl5/5.6.1/sun4-solaris /usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl . Environment for perl v5.6.1: HOME=/ah/csmith LANG (unset) LANGUAGE (unset) LC_COLLATE=en_US.ISO8859-1 LC_CTYPE=en_US.ISO8859-1 LC_MESSAGES=C LC_MONETARY=en_US.ISO8859-1 LC_NUMERIC=en_US.ISO8859-1 LC_TIME=en_US.ISO8859-1 LD_LIBRARY_PATH=../OBJsolaris:../OBJsolaris:/ibs/installed/lib:/ibs/sybase/lib::/usr/local/lib:/usr/local/lib:/usr/lib:/usr/ucblib LOGDIR (unset) PATH=/ah/csmith/bin:/ah/csmith/bin/sun4:/local/bin:/usr/local/bin:/usr/local/gnu/bin:/usr/local/etc:/local/X11R5/bin:/usr/local/X11R5/bin:/usr/bin/X11:/local/openwin/bin:/usr/openwin/bin:/usr/ccs/bin:/usr/bin:/bin:/usr/ucb:/usr/etc:/etc:/usr/sbin:/ibs/installed/bin:/ibs/os_support/bin:/ibs/sybase/bin:/sqa/bin:/usr/local/AcroRead/bin:/ah/csmith/bin/solaris:/ah/mull/ssh/bin:/ah/csmith/bin/perl PERL5LIB=/ah/csmith/lib/perl:/ah/csmith/lib/perl5 PERL_BADLANG (unset) SHELL=/bin/csh ```
p5pRT commented 22 years ago

From @tux

On Tue 30 Apr 2002 18​:13\, csmith@​vgi.com wrote​:

This is a bug report for perl from csmith@​vgi.com\, generated with the help of perlbug 1.33 running under perl v5.6.1.

----------------------------------------------------------------- [Please enter your report here]

When generating a table\, that will never be printed\, using format it makes sense to not print the form feed character. Setting the $FORMAT_FORMFEED variable to undef rather\, rather than an empty string\, causes a segfault when the format is large enough to need a form feed. Setting the $FORMAT_FORMFEED variable to undef should be equivalent to an empty string rather than generating an obscure segfault that is difficult to trace (Thanks to Glen Dudek for helping me figure it out).

Since segfaults are generally considered to be bad\, shall I at least try to extend the test case to catch it?

ENOTIME for a quick fix here

-- H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/) using perl-5.6.1\, 5.7.3 & 631 on HP-UX 10.20 & 11.00\, AIX 4.2\, AIX 4.3\,   WinNT 4\, Win2K pro & WinCE 2.11. Smoking perl CORE​: smokers@​perl.org http​://archives.develooper.com/daily-build@​perl.org/ perl-qa@​perl.org send smoke reports to​: smokers-reports@​perl.org\, QA​: http​://qa.perl.org

p5pRT commented 20 years ago

From @tux

[csmith@​vgi.com - Tue Apr 30 02​:13​:46 2002]​:

This is a bug report for perl from csmith@​vgi.com\, generated with the help of perlbug 1.33 running under perl v5.6.1.

----------------------------------------------------------------- [Please enter your report here]

When generating a table\, that will never be printed\, using format it makes sense to not print the form feed character. Setting the $FORMAT_FORMFEED variable to undef rather\, rather than an empty string\, causes a segfault when the format is large enough to need a form feed. Setting the $FORMAT_FORMFEED variable to undef should be equivalent to an empty string rather than generating an obscure segfault that is difficult to trace (Thanks to Glen Dudek for helping me figure it out).

ENOTESTCASE

This was what I read in the report\, and it does not fail/core in 5.6.1 and up on my HP-UX 11.00

a5​:/u/usr/merijn 113 > perl5.6.1 xx.pl line 1 line 2 line 3 line 4 line 5 line 6 a5​:/u/usr/merijn 114 > perl5.8.0 xx.pl line 1 line 2 line 3 line 4 line 5 line 6 a5​:/u/usr/merijn 115 > perl5.9.0 xx.pl line 1 line 2 line 3 line 4 line 5 line 6 a5​:/u/usr/merijn 116 > cat xx.pl #!/pro/bin/perl

use strict; use warnings;

$^L = undef; $= = 5; write;

format STDOUT = line 1 line 2 line 3 line 4 line 5 line 6 . a5​:/u/usr/merijn 117 >

p5pRT commented 20 years ago

@tux - Status changed from 'open' to 'stalled'

p5pRT commented 16 years ago

p5p@spam.wizbit.be - Status changed from 'stalled' to 'rejected'