From: Jan Pechanec <Jan.Pechanec@oracle.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: dash@vger.kernel.org
Subject: Re: [External] : [PATCH] expand: Add bypass for literal "]" in expandmeta
Date: Mon, 10 Mar 2025 09:35:00 +0100 [thread overview]
Message-ID: <Z86kNH+oXupDQJ0X@len49> (raw)
In-Reply-To: <Z81ikFIDPKfySXN2@gondor.apana.org.au>
...
> Fix performance regression for idiomatic "[ ... ]" expression by
> adding a bypass for a literal "]" in pathname expansion.
>
> Reported-by: Jan Pechanec <Jan.Pechanec@oracle.com>
> Fixes: 8d0eca2d9fb5 ("expand: Rewrite expmeta meta detection")
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> diff --git a/src/expand.c b/src/expand.c
> index 7a30648..5114646 100644
> --- a/src/expand.c
> +++ b/src/expand.c
> @@ -1555,7 +1555,7 @@ expandmeta(struct strlist *str)
>
> if (fflag)
> goto nometa;
> - if (!strpbrk(str->text, "*?]"))
> + if (!strpbrk(str->text, "*?]") || !memcmp(str->text, "]", 2))
> goto nometa;
> savelastp = exparg.lastp;
Hi Herbert, thank you, this seems to fix the regression reported. I
just applied the patch and succesfully re-tested.
Regards,
Jan
--
Jan Pechanec <jan.pechanec@oracle.com>
prev parent reply other threads:[~2025-03-10 8:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 15:04 dash performance regression with [ in latest github code Jan Pechanec
2025-02-25 15:13 ` Jan Pechanec
2025-03-09 9:42 ` [PATCH] expand: Add bypass for literal "]" in expandmeta Herbert Xu
2025-03-10 8:35 ` Jan Pechanec [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z86kNH+oXupDQJ0X@len49 \
--to=jan.pechanec@oracle.com \
--cc=dash@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.