Linux DTrace development list
 help / color / mirror / Atom feed
From: Nick Alcock <nick.alcock@oracle.com>
To: Kris Van Hees <kris.van.hees@oracle.com>
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [PATCH] test: ensure casting does not affect value
Date: Thu, 01 Aug 2024 19:44:35 +0100	[thread overview]
Message-ID: <87o76cjd64.fsf@esperi.org.uk> (raw)
In-Reply-To: <SN7PR10MB6287E87D4C69887B1DC570C7C2B12@SN7PR10MB6287.namprd10.prod.outlook.com> (Kris Van Hees's message of "Wed, 31 Jul 2024 15:01:42 -0400")

On 31 Jul 2024, Kris Van Hees outgrape:

> On systems without CTF, we do not know the type of kernel variables.
> By doing an explicit cast to int64_t a negative int is converted into a
> large positive integer.  The proper cast is 'int' of course.
>
> Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>

> -	trace((int64_t)`crashing_cpu);
> +	trace((int)`crashing_cpu);

Hm what type is it actually...

... int, but it's under arch/{x86,mips,powerpc}. Is this test going to
break on other architectures (like arm64)?

I know this is a pre-existing bug. The cast is correct, so

Reviewed-by: Nick Alcock <nick.alcock@oracle.com>

-- 
NULL && (void)

  parent reply	other threads:[~2024-08-01 18:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-31 19:01 [PATCH] test: ensure casting does not affect value Kris Van Hees
2024-07-31 19:51 ` Eugene Loh
2024-07-31 20:04   ` Kris Van Hees
2024-08-01 18:44 ` Nick Alcock [this message]
2024-08-01 19:03   ` Kris Van Hees

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=87o76cjd64.fsf@esperi.org.uk \
    --to=nick.alcock@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    --cc=kris.van.hees@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox