Perl / perl5

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

Segmentation Fault - chop in 5.6.1 #5937

Closed p5pRT closed 19 years ago

p5pRT commented 21 years ago

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

Searchable as RT17418$

p5pRT commented 21 years ago

From mdavy@hortresearch.co.nz

Hi\, I couldnt find if this had been addressed in the bug tracking for perl 5.8.0 As I do not have 5.8.0 installed could somebody try this please and see if you also get a segmentation fault .

perl -e 'chop(foo)' Segmentation fault # On 5.6.1 Linux 2.4.18-3 Red Hat Linux 7.3

chop and chomp expect a string or list\, if you accidentally give the function a bareword arguement perl spits the dummy. This also occurs in scripts where you test for syntax . e.g.

more test.pl #!/usr/bin/perl -w use strict; chop(foo);

perl -c test.pl Segmentation fault

I would much prefer a fatal trappable diagnostic error.

marcus

______________________________________________________ The contents of this e-mail are privileged and/or confidential to the named recipient and are not to be used by any other person and/or organisation. If you have received this e-mail in error\, please notify the sender and delete all material pertaining to this e-mail. ______________________________________________________

p5pRT commented 21 years ago

mdavy@hortresearch.co.nz - Status changed from 'new' to 'open'

p5pRT commented 21 years ago

From @rgs

marcus davy (via RT) \perlbug@​perl\.org wrote​:

Hi\, I couldnt find if this had been addressed in the bug tracking for perl 5.8.0 As I do not have 5.8.0 installed could somebody try this please and see if you also get a segmentation fault .

perl -e 'chop(foo)' Segmentation fault # On 5.6.1 Linux 2.4.18-3 Red Hat Linux 7.3

Thanks for your report. It appears that this bug has been corrected in 5.8.0 (and it wasn't present in 5.6.0 and before.)

p5pRT commented 19 years ago

From @smpeters

[rafael - Thu Sep 19 04​:47​:50 2002]​:

marcus davy (via RT) \perlbug@​perl\.org wrote​:

Hi\, I couldnt find if this had been addressed in the bug tracking for perl 5.8.0 As I do not have 5.8.0 installed could somebody try this please and see if you also get a segmentation fault .

perl -e 'chop(foo)' Segmentation fault # On 5.6.1 Linux 2.4.18-3 Red Hat Linux 7.3

Thanks for your report. It appears that this bug has been corrected in 5.8.0 (and it wasn't present in 5.6.0 and before.)

This is also fixed in 5.6.2.

p5pRT commented 19 years ago

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