All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Ian Rogers <irogers@google.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH v1] libtraceevent: Avoid a simple asprintf case
Date: Thu, 16 May 2024 19:51:10 -0400	[thread overview]
Message-ID: <20240516195110.2b91d4d9@rorschach.local.home> (raw)
In-Reply-To: <CAP-5=fUYxxmH8X0RVhdSWzKFT+WJO_UDULCtO4PK+VO-osXwGA@mail.gmail.com>

On Thu, 16 May 2024 15:09:40 -0700
Ian Rogers <irogers@google.com> wrote:

> > This states what the patch does, but omits why. What's wrong with
> > asprintf() here?  
> 
> Nothing except overhead. I was tracking down an asprintf issue [1],
> asprintf breaking the sanitizer stack traces on my debian based linux,
> and using asprintf for the sake of copying a character was creating a
> huge amount of noise for me. 2 lines-of-code extra means this change
> is by one measure more complex but it removes special knowledge of
> asprintf return values and the meaning of %c, so on the other hand it
> is less complex. I won't be offended if it's not accepted.

I don't mind taking the patch, but the above description is needed in
the change log, as that explains the purpose of the patch.

You don't need to resend, I'll just cut and paste what you wrote above
to the commit message.

Thanks,

-- Steve

  reply	other threads:[~2024-05-16 23:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09  5:13 [PATCH v1] libtraceevent: Avoid a simple asprintf case Ian Rogers
2024-05-16 22:02 ` Steven Rostedt
2024-05-16 22:09   ` Ian Rogers
2024-05-16 23:51     ` Steven Rostedt [this message]
2024-05-28 15:51       ` Ian Rogers

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=20240516195110.2b91d4d9@rorschach.local.home \
    --to=rostedt@goodmis.org \
    --cc=irogers@google.com \
    --cc=linux-trace-devel@vger.kernel.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 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.