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: [DTrace-devel] [PATCH 4/5] trace: handle the empty string in a sensible way
Date: Thu, 14 Aug 2025 15:38:47 -0400 [thread overview]
Message-ID: <aJ47R+2qxte5kMYu@oracle.com> (raw)
In-Reply-To: <90b9cbeb-1960-96f1-5f6d-34acbec013a8@oracle.com>
On Thu, Aug 14, 2025 at 12:18:42PM -0400, Eugene Loh wrote:
> I agree, but does this change any test results? If not, should there be a
> test added?
Hm, it did at some point in my testing (which is why I added this patch), but
now I do not have that same effect, so I think that perhaps another change I
was making interfered. So, I will add a test and post v2.
> On 8/13/25 11:57, Kris Van Hees via DTrace-devel wrote:
> > The trace("") action would dump a series of 0x00 bytes (strsize of
> > them) rather than printing an empty string. While that is the legacy
> > behaviour, it does not really make any sense to do so. The trace
> > action is described as printing data as a string if possible, and a
> > block of 0-bytes can certainly be printed as an empty string.
> >
> > Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
> > ---
> > libdtrace/dt_consume.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libdtrace/dt_consume.c b/libdtrace/dt_consume.c
> > index edfe5bbae..2dce69d6d 100644
> > --- a/libdtrace/dt_consume.c
> > +++ b/libdtrace/dt_consume.c
> > @@ -991,7 +991,7 @@ dt_print_bytes(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr,
> > c[i] == '\b' || c[i] == '\a')
> > continue;
> > - if (c[i] == '\0' && i > 0) {
> > + if (c[i] == '\0') {
> > /*
> > * This looks like it might be a string. Before we
> > * assume that it is indeed a string, check the
prev parent reply other threads:[~2025-08-14 19:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 15:57 [PATCH 4/5] trace: handle the empty string in a sensible way Kris Van Hees
2025-08-14 16:18 ` [DTrace-devel] " Eugene Loh
2025-08-14 19:38 ` 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=aJ47R+2qxte5kMYu@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.