NetBSD Problem Report #42832

From Atsushi.Onoe@jp.sony.com  Wed Feb 17 06:09:47 2010
Return-Path: <Atsushi.Onoe@jp.sony.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 0876163B8DE
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 17 Feb 2010 06:09:47 +0000 (UTC)
Message-Id: <201002170609.o1H69hYl006254@nebula.sm.sony.co.jp>
Date: Wed, 17 Feb 2010 15:09:43 +0900 (JST)
From: Atsushi Onoe <onoe@NetBSD.org>
To: gnats-bugs@gnats.NetBSD.org
Subject: nvi-m17n fails to search multibyte char on 64bit environment
X-Send-Pr-Version: 3.95

>Number:         42832
>Category:       pkg
>Synopsis:       nvi-m17n fails to search multibyte char on 64bit environment
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 17 06:10:00 +0000 2010
>Closed-Date:    Sat Feb 12 02:53:23 +0000 2011
>Last-Modified:  Sat Feb 12 02:55:01 +0000 2011
>Originator:     Atsushi Onoe
>Release:        NetBSD 5.0_STABLE
>Organization:
>Environment:
System: NetBSD nebula.sm.sony.co.jp 5.0_STABLE NetBSD 5.0_STABLE (NEBULA) #1: Wed Feb 3 15:00:13 JST 2010 onoe@nebula.sm.sony.co.jp:/usr/obj/NEBULA amd64
Architecture: x86_64
Machine: amd64
>Description:

	On 64bit environment, searching multibyte characters by '/' or '?'
	with nvi-m17n always fails with "Patterh not found".
	On 32bit environment such as i386, it works fine.
	ASCII charactors are matched on both environment.

>How-To-Repeat:
	Build nvi-m17n on amd64, and search Japanese KANJI characters.

>Fix:

--- regex/regex2.h.orig	2010-02-17 10:02:57.000000000 +0900
+++ regex/regex2.h
@@ -80,8 +80,8 @@
 #define	OPRMASK	0xf8000000
 #define	OPDMASK	0x07ffffff
 #define	OPSHIFT	((unsigned)27)
-#define	OP(n)	((n)&OPRMASK)
-#define	OPND(n)	((n)&OPDMASK)
+#define	OP(n)	((unsigned)((n)&OPRMASK))
+#define	OPND(n)	((unsigned)((n)&OPDMASK))
 #define	SOP(op, opnd)	((op)|(opnd))
 /* operators			   meaning	operand			*/
 /*						(back, fwd are offsets)	*/

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: obache@NetBSD.org
State-Changed-When: Sat, 12 Feb 2011 02:53:23 +0000
State-Changed-Why:
Applied patch.  Thanks!


From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/42832 CVS commit: pkgsrc/editors/nvi-m17n
Date: Sat, 12 Feb 2011 02:52:35 +0000

 Module Name:	pkgsrc
 Committed By:	obache
 Date:		Sat Feb 12 02:52:34 UTC 2011

 Modified Files:
 	pkgsrc/editors/nvi-m17n: Makefile distinfo
 Added Files:
 	pkgsrc/editors/nvi-m17n/patches: patch-regex_regex2.h

 Log Message:
 Add an patch to fix multibyte char search on 64bit environment.
 PR#42832 by Atsushi Onoe.

 Bump PKGREVISION.


 To generate a diff of this commit:
 cvs rdiff -u -r1.43 -r1.44 pkgsrc/editors/nvi-m17n/Makefile
 cvs rdiff -u -r1.11 -r1.12 pkgsrc/editors/nvi-m17n/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/editors/nvi-m17n/patches/patch-regex_regex2.h

 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.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.