[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: segfault if nameref set on local variable
From: |
Chet Ramey |
Subject: |
Re: segfault if nameref set on local variable |
Date: |
Wed, 07 May 2014 10:58:42 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 5/7/14, 10:21 AM, Dan Douglas wrote:
> Another one to do with namerefs. :-)
>
> Looks like it's when the target of the ref is local to the same scope.
>
> $ gdb -q -ex 'run -c "function f { typeset x; typeset -n x; x=y; }; f"' ./bash
Thanks for the report. This is an abstraction layer violation (and a long-
lived one; it's been this way for years). I've attached a patch for people
to play with.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
localvar-invisible.patch
Description: Source code patch