NetBSD Problem Report #53206

From www@NetBSD.org  Mon Apr 23 12:41:57 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 DB7097A174
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 23 Apr 2018 12:41:57 +0000 (UTC)
Message-Id: <20180423124156.CFF7A7A1F3@mollari.NetBSD.org>
Date: Mon, 23 Apr 2018 12:41:56 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/sys/arch/riscv/riscv/db_machdep.c:89: bad expression ?
X-Send-Pr-Version: www-1.0

>Number:         53206
>Category:       kern
>Synopsis:       src/sys/arch/riscv/riscv/db_machdep.c:89: bad expression ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 23 12:45:00 +0000 2018
>Closed-Date:    Thu May 10 09:40:58 +0000 2018
>Last-Modified:  Thu May 10 09:40:58 +0000 2018
>Originator:     David Binderman
>Release:        cvs-20180418
>Organization:
>Environment:
>Description:
src/sys/arch/riscv/riscv/db_machdep.c:89] -> [src/sys/arch/riscv/riscv/db_machdep.c:89]: (style) Opposite expression on both sides of '&&'.

Source code is

     KASSERT(db_regs <= vp && vp < db_regs);

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53206 CVS commit: src/sys/arch/riscv/riscv
Date: Mon, 23 Apr 2018 11:40:33 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Mon Apr 23 15:40:33 UTC 2018

 Modified Files:
 	src/sys/arch/riscv/riscv: db_machdep.c

 Log Message:
 PR/53206: David Binderman: fix array bounds comparison in KASSERT.


 To generate a diff of this commit:
 cvs rdiff -u -r1.1 -r1.2 src/sys/arch/riscv/riscv/db_machdep.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: Thu, 10 May 2018 09:40:58 +0000
State-Changed-Why:
Fixed by christos. Thanks for the report. (There is no pullup because riscv is not yet functional).


>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.