Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [hamer@xxxxxxxxxxxx: Bug#590736: zsh: Segmentation fault in completion]
- X-seq: zsh-workers 28105
- From: Peter Stephenson <Peter.Stephenson@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [hamer@xxxxxxxxxxxx: Bug#590736: zsh: Segmentation fault in completion]
- Date: Thu, 29 Jul 2010 10:07:37 +0100
- In-reply-to: <20100729044858.GA360@xxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Cambridge Silicon Radio
- References: <20100729044858.GA360@xxxxxxxx>
On Thu, 29 Jul 2010 04:48:58 +0000
ÐÐÐÐÑÐÐÐÑ ÐÐÐÐÑÐÐÐÐ <hamer@xxxxxxxxxxxx> wrote:
> As you can see, problem is in spelling NULL-pointer in matcheq().
>
> For resolving ths bug, i propose use this patch:
>
> diff -Naur zsh-4.3.10.orig/Src/Zle/compcore.c
> zsh-4.3.10/Src/Zle/compcore.c --- zsh-4.3.10.orig/Src/Zle/compcore.c
> 2009-01-13 12:15:38.000000000 +0000 +++
> zsh-4.3.10/Src/Zle/compcore.c 2010-07-27 22:58:40.726692827
> +0000 @@ -2932,7 +2932,7 @@ comp_setunset(0, 0, CP_EXACTSTR, 0);
> }
> ai->exactm = cm;
> - } else if (useexact && !matcheq(cm, ai->exactm)) {
> + } else if (useexact && (!ai->exactm || !matcheq(cm, ai->exactm))) {
> ai->exact = 2;
> ai->exactm = NULL;
> if (incompfunc)
Thanks, that looks entirely reasonable. It's clear from the code just
below that ai->exactm can be NULL when ai->exact is non-zero, which appears
to violate the assumption behind the previous code. Given it's a week's
work to understand the completion code in enough detail to test the
assumptions any further, I'll leave it at that.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
Messages sorted by:
Reverse Date,
Date,
Thread,
Author