All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tedd Ho-Jeong An <tedd.an@linux.intel.com>
To: Marcel Holtmann <marcel@holtmann.org>,
	Tedd Ho-Jeong An <hj.tedd.an@gmail.com>
Cc: BlueZ <linux-bluetooth@vger.kernel.org>
Subject: Re: [BlueZ PATCH] shared: Fix the incorrect type with bit shift
Date: Thu, 17 Feb 2022 08:36:13 -0800	[thread overview]
Message-ID: <aad96edd229fbb2b2b8d19727696e24add6783cb.camel@linux.intel.com> (raw)
In-Reply-To: <9ADB9AF8-0F3F-4B49-BA89-1026920C591A@holtmann.org>

Hi Marcel,

On Thu, 2022-02-17 at 10:55 +0100, Marcel Holtmann wrote:
> Hi Tedd,
> 
> > This patch fixes the following runtime error:
> > 
> > $ sudo ./monitor/btmon -w test.btsnoop
> >  Bluetooth monitor ver 5.63
> >  src/shared/btsnoop.c:339:18: runtime error: left shift of 65535 by 16 places cannot be represented in type 'int'
> 
> what compiler version is this? Or what warnings did you enable? Since this is weird, so while yes 0xffff can not be shifted, but we are also not shifting into an uint16_t. The fix is fine, I am just
> curious. There will be other places with the same problem.

I am using gcc 9.3.0 came with Ubuntu 20.04.
This is enabled by the "-fsanitize=undefined" option.

Recent change enabled LSAN, ASAN, and UBSAN by default.


> 
> Regards
> 
> Marcel
> 



      reply	other threads:[~2022-02-17 16:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17  6:31 [BlueZ PATCH] shared: Fix the incorrect type with bit shift Tedd Ho-Jeong An
2022-02-17  8:00 ` [BlueZ] " bluez.test.bot
2022-02-17  9:55 ` [BlueZ PATCH] " Marcel Holtmann
2022-02-17 16:36   ` Tedd Ho-Jeong An [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=aad96edd229fbb2b2b8d19727696e24add6783cb.camel@linux.intel.com \
    --to=tedd.an@linux.intel.com \
    --cc=hj.tedd.an@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.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.