NetBSD Problem Report #53338

From www@NetBSD.org  Sun Jun  3 18:59:28 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B0BCC7A14F
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  3 Jun 2018 18:59:28 +0000 (UTC)
Message-Id: <20180603185927.CF24B7A219@mollari.NetBSD.org>
Date: Sun,  3 Jun 2018 18:59:27 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/sys/arch/aarch64/aarch64/db_interface.c:150: possible 32 / 64 bit problem ?
X-Send-Pr-Version: www-1.0

>Number:         53338
>Category:       port-arm
>Synopsis:       src/sys/arch/aarch64/aarch64/db_interface.c:150: possible 32 / 64 bit problem ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-arm-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 03 19:00:00 +0000 2018
>Closed-Date:    Sun Jun 03 22:34:58 +0000 2018
>Last-Modified:  Thu Jun 14 08:30:00 +0000 2018
>Originator:     David Binderman
>Release:        cvs-20180603
>Organization:
>Environment:
>Description:
src/sys/arch/aarch64/aarch64/db_interface.c:150]: (style) int result is assigned to long variable. 

Source code is

        const uint64_t signbit = (1 << (bitwidth - 1));

If bitwith ever goes over 32 bits, then this might be
better code:

        const uint64_t signbit = (1UL << (bitwidth - 1));

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53338 CVS commit: src/sys/arch/aarch64/aarch64
Date: Sun, 3 Jun 2018 16:18:11 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Sun Jun  3 20:18:10 UTC 2018

 Modified Files:
 	src/sys/arch/aarch64/aarch64: db_interface.c

 Log Message:
 PR/53338: David Binderman: Widen shift to the LHS type.


 To generate a diff of this commit:
 cvs rdiff -u -r1.3 -r1.4 src/sys/arch/aarch64/aarch64/db_interface.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sun, 03 Jun 2018 22:34:58 +0000
State-Changed-Why:
Christos committed a variant. Thanks for the report!


From: "Ryo Shimizu" <ryo@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53338 CVS commit: src/sys/arch/aarch64/aarch64
Date: Thu, 14 Jun 2018 08:27:10 +0000

 Module Name:	src
 Committed By:	ryo
 Date:		Thu Jun 14 08:27:10 UTC 2018

 Modified Files:
 	src/sys/arch/aarch64/aarch64: disasm.c

 Log Message:
 Widen shift to the LHS type.
 same as aarch64/db_interface.c r1.4, PR/53338.


 To generate a diff of this commit:
 cvs rdiff -u -r1.1 -r1.2 src/sys/arch/aarch64/aarch64/disasm.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.