From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 16 11:50:40 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D9E9516A4CE for ; Mon, 16 Feb 2004 11:50:40 -0800 (PST) Received: from artax.karlin.mff.cuni.cz (artax.karlin.mff.cuni.cz [195.113.31.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9B1243D6B for ; Mon, 16 Feb 2004 11:50:40 -0800 (PST) (envelope-from mikulas@artax.karlin.mff.cuni.cz) Received: by artax.karlin.mff.cuni.cz (Postfix, from userid 17421) id 282B0408C; Mon, 16 Feb 2004 20:50:39 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by artax.karlin.mff.cuni.cz (Postfix) with ESMTP id 278D03F92 for ; Mon, 16 Feb 2004 20:50:39 +0100 (CET) Date: Mon, 16 Feb 2004 20:50:39 +0100 (CET) From: Mikulas Patocka To: freebsd-hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Tue, 17 Feb 2004 06:06:23 -0800 Subject: signed char bug in regexp library X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2004 19:50:41 -0000 Hi I ripped regexp library from FreeBSD 4 and use it in another program. I get random crashes because the library casts char to int and uses it as array index ... the most obvious case is engine.i:189: register char *dp; dp += charjump[(int)*dp]; but there are many more and I'm unable to spot them all. When i compile library with -funsigned-char, it works fine. But it isn't compiled with that flag in FreeBSD. Mikulas