Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Segmentation fault immediately after 'unset PATH'
- X-seq: zsh-workers 44508
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: <zsh-workers@xxxxxxx>
- Subject: Re: Segmentation fault immediately after 'unset PATH'
- Date: Thu, 11 Jul 2019 09:44:32 +0100
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190711084434euoutp01984ceefa027481dc91200fe11beae78c~wTds36jrL2240422404euoutp01i
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1562834674; bh=4ayXxVBR0rU7apCnvNAt9oD8A1ves5zghzvzI1d+P5M=; h=Subject:From:To:Date:In-Reply-To:References:From; b=LflCuSfvmhsAq2FMuFbBjwa3Qh9DRwYHIc/wv2x7cqVk3ja1e808h68eNPEXvbmOF x6Es9Pz7L5pg6Tp6iXJWAee0RyfIWVzr20Depzrx6wXomYMiTIIYwdp7wOT3MWEWZg Jr7wNskT+dfe0EemNYLVVPl7ZLmT8Fn5tGjU7aZ0=
- In-reply-to: <CAHYJk3Te=EKxLh3Wo0fbFn2awx2d8sc8HwoZihQqwd6mik8svg@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAPkN6ar45kY-bu=XBs-feUx2R4UFh1d2E6m7rZrbAAKm+3sd1A@mail.gmail.com> <CGME20190710215257epcas2p3150c3096788c5d5a56e212b9e7067f19@epcas2p3.samsung.com> <CAHYJk3Te=EKxLh3Wo0fbFn2awx2d8sc8HwoZihQqwd6mik8svg@mail.gmail.com>
On Wed, 2019-07-10 at 23:52 +0200, Mikael Magnusson wrote:
> On 7/10/19, Shane Squires <shane2squires@xxxxxxxxx> wrote:
> > The following script, when executed, produces a segmentation fault for me.
> > This is the most minimal example I can construct.
> >
> > ------------------
> > File run.zsh:
> > ------------------
> > #! /usr/bin/zsh
> >
> > run() {
> > typeset -U path=( $path )
> > unset PATH
> > }
> >
> > run
>
> This is the backtrace i get with debugging symbols,
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000000004832b8 in unsetparam_pm (pm=0x716a70, altflag=1, exp=1) at
> params.c:3614
> 3614 pm->gsu.s->unsetfn(pm, exp);
> (gdb) bt
> #0 0x00000000004832b8 in unsetparam_pm (pm=0x716a70, altflag=1,
> exp=1) at params.c:3614
The gsu element (get/set/unset handlers) of that parameter element,
which is the special one for path (N.B. not PATH which is linked), are
null. That shouldn't ever happen, so it's already broken. Presumably
this is somehow associated with the typeset.
The parameter structure looks otherwise reasonable, except the PM_UNIQUE
flag has gone by this point. I'm seeing
PM_RESTRICTED|PM_DONTIMPORT|PM_SPECIAL|PM_TIED|PM_ARRAY
all of which make sense.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author