develooper Front page | perl.perl5.porters | Postings from February 2011

segmentation file with $dbline[0]

Thread Next
From:
vadim.konovalov
Date:
February 25, 2011 02:05
Subject:
segmentation file with $dbline[0]
Message ID:
35BF8D9716175C43BB9D67CA60CC345E2776A708@FRMRSSXCHMBSC2.dc-m.alcatel-lucent.com
Hi, following line:

perl -wle '$r=q/print __FILE__;local *dbline = $main::{"_<".__FILE__};print $dbline[0]/;eval $r;'

gives me a segmentation fault for 5.10.1, 5.12.1 but not 5.8.8
OS is linux.

on windows, this line does not segfaults for 5.6.1, 5.004_02, 5.005_03, 5.8.8, 5.12.1, 5.10.0, but segfaults for 5.13.8
perl -wle "$r=q/print __FILE__;local *dbline = $main::{'_<'.__FILE__};print $dbline[0]/;eval $r;"

On windows, to ease struggle with command line, following script could be used
$r=q/
  print __FILE__, "\n";
  print join "; ",sort keys %{"::"};
  local *dbline = ${"::_<(eval 1)"};
  print $dbline[0]/;
eval "$r";


Any ideas on the matter?

TIA,
Vadim.
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About