This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Should PERLIO=no_crlf be the default on Cygwin?

On Sat, 31 May 2003, Gerrit P. Haase wrote:

> #!/usr/bin/perl
> open OUTFILE, ">:crlf", "text.txt";
> print OUTFILE "This is a test.\n";
> close OUTFILE;

Oh, yeh. That works.

greg@7106 ~
$ perl -e 'open OUTFILE,">:crlf","text.txt";print OUTFILE "\n";' ; cat text.txt|od -a
0000000  cr  nl

greg@7106 ~
$ perl -e 'open OUTFILE,">:bytes","text.txt";print OUTFILE "\n";' ; cat text.txt|od -a
0000000  nl


greg@7106 ~
$ export PERLIO=bytes

greg@7106 ~
$ perl -e 'open STDOUT,">:crlf",">&1"'

produced a segfault.

And now the first of those one-liners above is also producing segfaults:

This GDB was configured as "i686-pc-cygwin"...(no debugging symbols found)...
Attaching to program `/usr/bin/PERL.EXE', process -15762415
[Switching to thread -15762415.0xfff2697d]
(gdb) bt
#0  0xbff76921 in KERNEL32!CallNamedPipeW ()
#1  0xbff88027 in KERNEL32!BuildCommDCBA ()
#2  0x100fe8af in cygperl5_8_0!PerlIO_openn () from /usr/bin/cygperl5_8_0.dll
#3  0x100dc088 in cygperl5_8_0!Perl_do_openn () from /usr/bin/cygperl5_8_0.dll
#4  0x100c8ee3 in cygperl5_8_0!Perl_pp_open () from /usr/bin/cygperl5_8_0.dll
#5  0x100787fd in cygperl5_8_0!Perl_runops_debug () from /usr/bin/cygperl5_8_0.dll
#6  0x10004697 in perl_run () from /usr/bin/cygperl5_8_0.dll
#7  0x10004355 in perl_run () from /usr/bin/cygperl5_8_0.dll
#8  0x0040113d in ?? ()
#9  0x61007408 in cygwin1!__assert () from /usr/bin/CYGWIN1.DLL
#10 0x610076ed in dll_crt0@0 () from /usr/bin/CYGWIN1.DLL
#11 0x00403ed2 in ?? ()
#12 0x0040103c in ?? ()
#13 0xbff8b6be in KERNEL32!EnumTimeFormatsA ()
#14 0xbff8b570 in KERNEL32!FT_Thunk ()
#15 0xbff89f33 in KERNEL32!BeginUpdateResourceA ()
Cannot access memory at address 0x83b51fec

Greg Matheson            Failed to turn my reluctant students into autonomous
Dr Bean's Penpal Pool    language learners, but it did wonders for my personal
Address: palpool         fitness program.

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]