From owner-cvs-all@FreeBSD.ORG Mon Aug 8 19:38:00 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE29316A41F; Mon, 8 Aug 2005 19:38:00 +0000 (GMT) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CC4643D45; Mon, 8 Aug 2005 19:38:00 +0000 (GMT) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j78Jc04S045125; Mon, 8 Aug 2005 19:38:00 GMT (envelope-from pjd@repoman.freebsd.org) Received: (from pjd@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j78Jc0DO045124; Mon, 8 Aug 2005 19:38:00 GMT (envelope-from pjd) Message-Id: <200508081938.j78Jc0DO045124@repoman.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 8 Aug 2005 19:38:00 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/libkern strcasecmp.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2005 19:38:01 -0000 pjd 2005-08-08 19:38:00 UTC FreeBSD src repository Modified files: sys/libkern strcasecmp.c Log: Ha! This is a very interesting bug. I copied strcasecmp() from userland to the kernel and it didn't worked! I started to debug the problem and I find out that this line: while (tolower(*us1) == tolower(*us2++)) { was adding _3_ bytes to 'us2' pointer. Am I loosing my minds here?!... No, in-kernel tolower() is a macro which uses its argument three times. Bad tolower(9), no cookie. Revision Changes Path 1.2 +6 -4 src/sys/libkern/strcasecmp.c