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): perl-5.8.0-88.x How reproducible: Always Steps to Reproduce: 1. Run code provided. #!/usr/bin/perl # load some text... open(FILE,"/usr/share/doc/redhat-release-9/EULA"); $text = <FILE>; close(FILE); # call the swrite subroutine defined later print swrite(<<'END', "$text"); ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~~ END # simplified swrite routine taken from the perlform perldoc page sub swrite { my ($format,@strings) = @_; $^A = ""; formline($format,@strings); 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... Thanks
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.