Bug 107206 - CORE Dump on formline usage
Summary: CORE Dump on formline usage
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: perl   
(Show other bugs)
Version: 9
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Jason Vas Dias
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2003-10-15 19:44 UTC by MadHat
Modified: 2007-04-18 16:58 UTC (History)
0 users

Fixed In Version: ALL
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-11-11 23:32:30 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description MadHat 2003-10-15 19:44:27 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
When using an example from the perldoc perlform pages I am able to reproduce a
segmentation fault in perl installed by default on RedHat 9.   Specifically this
is in the formline function that is part of perl. (perldoc -f formline)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.  Run code provided.


# load some text...
$text = <FILE>;

# call the swrite subroutine defined later
print swrite(<<'END', "$text");
    ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~~

# simplified swrite routine taken from the perlform perldoc page
sub swrite {
  my ($format,@strings) = @_;
  $^A = "";
  return $^A;

Actual Results:  
$ ./test.pl
Segmentation fault

Expected Results:  It should print the EULA reformatted to the specified width
without the blank lines (basically just reprint the EULA).  Run it on a RH8 or
any box with perl compiled from source.

Additional info:

Stepping through with the perl debugger it just hangs.  Using gdb to do a
backtrace, I get this:

(gdb) bt
#0  0x4207bee3 in memmove () from /lib/tls/libc.so.6
#1  0x08a0e040 in ?? ()
#2  0x400ad00c in Perl_sv_clear (my_perl=0x804bcb8, sv=0x899eeac) at sv.c:5083
#3  0x400ad764 in Perl_sv_free (my_perl=0x804bcb8, sv=0x899eeac) at sv.c:5226
#4  0x40098ef3 in Perl_av_clear (my_perl=0x804bcb8, av=0x8664c3c) at av.c:456
#5  0x400cae2c in Perl_leave_scope (my_perl=0x804bcb8, base=210) at scope.c:903
#6  0x400c906c in Perl_pop_scope (my_perl=0x3ffffbe1) at scope.c:137
#7  0x400d1be8 in Perl_pp_return (my_perl=0x804bcb8) at pp_ctl.c:1850
#8  0x40086a0a in Perl_runops_debug (my_perl=0x804bcb8) at dump.c:1414
#9  0x4003a9bb in S_run_body (my_perl=0x804bcb8, oldscope=-240) at perl.c:1705
#10 0x4003a645 in perl_run (my_perl=0x804bcb8) at perl.c:1624
#11 0x080493a3 in main ()
#12 0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6

I ahve scripts that use this, though not ofter, that I wront on a RH8 machine. 
I upgraded a while back, but don't normally run with that function from my
notebook.  I ahve been trying to debug the problem and did a fresh install of
RH9 and still ahd the issue.  Traced it down to the swrite function/sub and
wrote the test script above and here we are...


Comment 1 Jason Vas Dias 2005-11-11 23:32:30 UTC
Very sorry for the long delay in processing this bug report.
This bug is no longer a problem for the perl versions in any Red Hat OS release.

Note You need to log in before you can comment on or make changes to this bug.