ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl5-porters
perl5-porters
Re: [ID 20000929.001] Using ARGV can cause core dump
by Hugo other posts by this author
Sep 29 2000 9:41PM messages near this date
[ID 20000929.001] Using ARGV can cause core dump | Re: [ID 20000929.001] Using ARGV can cause core dump
In <20000930070622.3588.qmail@[...].com> , jlawrenc@[...].com writes:
:By assigning $ARGV[1] to a variable:
: $lang=$ARGV[1] || "e";
:and then later using it in hash references:
: $blort{'e'}="Happy day"
: print $blort{$lang}
:I sometimes core dump.

That seems very strange. If you can find a way of making it reliably
reproducible and then cut it down to a small test case it would be
very helpful. It initially sounds as if the original system memory
for the arguments is being moved out from under you, but as far as I
can see the arguments are _copied_ into newly acquired memory when
setting up the ARGV array. (In 5.6.0 this should be done by the code:
            SV *sv = newSVpv(argv[0],0);
at line 3180 of perl.c).

If that is the case, it sounds likely to be a more random corruption
that just happens to be hitting this variable. If so, I'd expect
you to see other variables causing a coredump from time to time as
well. This shouldn't be happening. :)

Hugo
Thread:

Hugo
Jay Lawrence

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved