From: Kris Van Hees <kris.van.hees@oracle.com>
To: Eugene Loh <eugene.loh@oracle.com>
Cc: Kris Van Hees <kris.van.hees@oracle.com>,
dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [PATCH 1/2] error: report probe name on failed enabling error
Date: Mon, 17 Mar 2025 16:03:40 -0400 [thread overview]
Message-ID: <Z9iAHCiV6Sk/PrGY@oracle.com> (raw)
In-Reply-To: <da946028-f3b4-89ef-92a8-9d46cac246f3@oracle.com>
On Mon, Mar 17, 2025 at 03:57:18PM -0400, Eugene Loh wrote:
> I don't 100% get our error reporting, but
> Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
>
> A few things...
>
> The various files need updated copyright years.
Good point.
> On 2/24/25 13:43, Kris Van Hees wrote:
>
> I don't know if anyone else sees this, but this is the second patch in a few
> days that has gotten buried in my inbox due to a stale date. (On Friday, I
> got one dated 1/24.) Anyhow, I suppose I now know to look for such emails.
My fault - due to how I was sending the patches, it took the date stamp on the
actual patch and this one was written end of last month, but never sent because
I was still working on some other things and it wasn't needed yet.
Will avoid that in the future.
> > diff --git a/libdtrace/dt_bpf.c b/libdtrace/dt_bpf.c
> > +int
> > +dt_attach_error(dtrace_hdl_t *dtp, int rc, ...)
> > +{
> > + va_list ap, apc;
> > + char *fmt;
>
> If you asprintf(&fmt), do you want a matching free() to prevent a memory
> leak? (Clearly not a big deal, but...)
> and finally...
Good catch - fixed.
> > diff --git a/libdtrace/dt_error.c b/libdtrace/dt_error.c
> > @@ -111,6 +111,8 @@ dtrace_errmsg(dtrace_hdl_t *dtp, int error)
> > if (error == EDT_COMPILER && dtp != NULL && dtp->dt_errmsg[0] != '\0')
> > str = dtp->dt_errmsg;
> > + if (error == EDT_ENABLING_ERR && dtp != NULL && dtp->dt_errmsg[0] != '\0')
> > + str = dtp->dt_errmsg;
> > else if (error == EDT_BPF && dtp != NULL && dtp->dt_errmsg[0] != '\0')
> > str = dtp->dt_errmsg;
> > else if (error == EDT_CTF && dtp != NULL && dtp->dt_ctferr != 0)
>
> Should that be "else if"? Otherwise, if error==EDT_COMPILER, you trigger
> both that clause and the later "else" clause.
Absolutely - fixed.
prev parent reply other threads:[~2025-03-17 20:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-24 18:43 [PATCH 1/2] error: report probe name on failed enabling error Kris Van Hees
2025-03-17 19:57 ` Eugene Loh
2025-03-17 20:03 ` Kris Van Hees [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=Z9iAHCiV6Sk/PrGY@oracle.com \
--to=kris.van.hees@oracle.com \
--cc=dtrace-devel@oss.oracle.com \
--cc=dtrace@lists.linux.dev \
--cc=eugene.loh@oracle.com \
/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.