From: Nicolas Boichat <drinkcat@chromium.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>,
Nicolas Boichat <drinkcat@chromium.org>,
Marc Zyngier <marc.zyngier@arm.com>,
Stephen Boyd <swboyd@chromium.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] scripts/decode_stacktrace: Match basepath using shell prefix operator, not regex
Date: Sat, 18 May 2019 13:59:46 +0800 [thread overview]
Message-ID: <20190518055946.181563-1-drinkcat@chromium.org> (raw)
The basepath may contain special characters, which would confuse
the regex matcher. ${var#prefix} does the right thing.
Fixes: 67a28de47faa8358 ("scripts/decode_stacktrace: only strip base path when a prefix of the path")
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
---
I'm not sure how people normally use this script, but this seems to break
even with a simple full path as parameter (e.g. /home/.../kernel/).
scripts/decode_stacktrace.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
index bcdd45df3f5127a..e042acedcc0332c 100755
--- a/scripts/decode_stacktrace.sh
+++ b/scripts/decode_stacktrace.sh
@@ -85,7 +85,7 @@ parse_symbol() {
fi
# Strip out the base of the path
- code=${code//^$basepath/""}
+ code=${code#$basepath/}
# In the case of inlines, move everything to same line
code=${code//$'\n'/' '}
--
2.21.0.1020.gf2820cf01a-goog
reply other threads:[~2019-05-18 6:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190518055946.181563-1-drinkcat@chromium.org \
--to=drinkcat@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=khlebnikov@yandex-team.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=swboyd@chromium.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).