From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/4] KASan: only print to stderr
Date: Mon, 11 Sep 2023 14:56:18 +0200 [thread overview]
Message-ID: <20230911125619.2782229-4-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20230911125619.2782229-1-a.fatoum@pengutronix.de>
Part of KASan output, like the stack trace, is already printed to
stderr, while some others are printed to stdout. Let's print everything
to stderr as not to complicate debugging when stdout and stderr go to
different consoles.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
lib/kasan/report.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/kasan/report.c b/lib/kasan/report.c
index a67ba8c108f5..3d8f0c3b5162 100644
--- a/lib/kasan/report.c
+++ b/lib/kasan/report.c
@@ -138,7 +138,7 @@ static void print_shadow_for_address(const void *addr)
shadow_buf, SHADOW_BYTES_PER_ROW, 0);
if (row_is_guilty(shadow_row, shadow))
- printf("%*c\n",
+ eprintf("%*c\n",
shadow_pointer_offset(shadow_row, shadow),
'^');
--
2.39.2
next prev parent reply other threads:[~2023-09-11 12:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 12:56 [PATCH 0/4] KASan: print output directly " Ahmad Fatoum
2023-09-11 12:56 ` [PATCH 1/4] ARM: unwind: don't allocate while printing stack trace Ahmad Fatoum
2023-09-11 12:56 ` [PATCH 2/4] ARM64: backtrace: print stacktrace to stderr Ahmad Fatoum
2023-09-11 12:56 ` Ahmad Fatoum [this message]
2023-09-11 12:56 ` [PATCH 4/4] KASan: don't allocate memory while printing report Ahmad Fatoum
2023-09-12 9:36 ` [PATCH 0/4] KASan: print output directly to stderr Sascha Hauer
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=20230911125619.2782229-4-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.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