Segmentation Fault caused by accessing local array belonging to parent f
From:
Jakub Sadowski
Subject:
Segmentation Fault caused by accessing local array belonging to parent function?
Date:
Sun, 14 Sep 2003 12:44:45 -0700 (PDT)
Dear sir(s),
For your amusement please run the following code using bash version
2.05b.0(1)-release:
=============================
function a ()
{
echo "a1"
local myarray=( "a" )
echo "a2"
echo ${myarray[@]}
echo "a3"
b
echo "a4"
return 0
}
function b ()
{
echo "b1"
local myarray
echo "b2"
myarray[${#myarray[@]}]="b"
echo "b3"
echo ${myarray[@]}
echo "b4"
return 0
}
a
=======================
I get the following:
a1
a2
b1
b2
b3
Segmentation fault
I am using bash 2.05b with the first seven patches applied. I don't have the
expertise required
to debug this...sorry :- (
=====
- Jakub Sadowski
--
"The philosophy of one century is the common sense of the next." - Henry Ward
Beecher
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
[Prev in Thread]
Current Thread
[Next in Thread]
Segmentation Fault caused by accessing local array belonging to parent function?,
Jakub Sadowski<=