From: "Dmitry V. Levin" <ldv@altlinux.org>
To: libc-alpha@sourceware.org
Cc: Vitaly Chikunov <vt@altlinux.org>
Subject: Re: [PATCH] libSegFault: Fix printing signal number [BZ #27249]
Date: Tue, 2 Feb 2021 03:37:11 +0300 [thread overview]
Message-ID: <20210202003711.GD28363@altlinux.org> (raw)
In-Reply-To: <b98190ce-1076-ec20-3ece-1344ec236451@linaro.org>
On Mon, Feb 01, 2021 at 06:00:30PM -0300, Adhemerval Zanella via Libc-alpha wrote:
> On 01/02/2021 17:04, Vitaly Chikunov wrote:
> > Signal number is written into the tail of buf, but printed from the
> > beginning, outputting garbage on the screen. Print from the correct
> > position.
>
> LGTM, thanks.
>
> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Applied, thanks!
> > ---
> > debug/segfault.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/debug/segfault.c b/debug/segfault.c
> > index 0a6be8b9d4..1873022db9 100644
> > --- a/debug/segfault.c
> > +++ b/debug/segfault.c
> > @@ -58,7 +58,7 @@ write_strsignal (int fd, int signal)
> > char buf[30];
> > char *ptr = _itoa_word (signal, &buf[sizeof (buf)], 10, 0);
> > WRITE_STRING ("signal ");
> > - write (fd, buf, &buf[sizeof (buf)] - ptr);
> > + write (fd, ptr, &buf[sizeof (buf)] - ptr);
> > }
--
ldv
prev parent reply other threads:[~2021-02-02 0:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 20:04 Vitaly Chikunov
2021-02-01 21:00 ` Adhemerval Zanella
2021-02-02 0:37 ` Dmitry V. Levin [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=20210202003711.GD28363@altlinux.org \
--to=ldv@altlinux.org \
--cc=libc-alpha@sourceware.org \
--cc=vt@altlinux.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 read-only IMAP folder(s) and NNTP newsgroup(s).