From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexandre Oliva Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: memory corruption in regex.c Date: Sun, 23 Mar 2008 01:04:51 -0300 Organization: Red Hat OS Tools Group Message-ID: References: <200803221125.m2MBPZ7q021670@livre.oliva.athome.lsd.ic.unicamp.br> <87abkqo33m.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1206245129 1900 80.91.229.12 (23 Mar 2008 04:05:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Mar 2008 04:05:29 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 23 05:05:55 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JdHSu-0006Bo-4l for ged-emacs-devel@m.gmane.org; Sun, 23 Mar 2008 05:05:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JdHSJ-0008ME-Iv for ged-emacs-devel@m.gmane.org; Sun, 23 Mar 2008 00:05:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JdHSE-0008Lz-Oa for emacs-devel@gnu.org; Sun, 23 Mar 2008 00:05:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JdHSD-0008Ln-CV for emacs-devel@gnu.org; Sun, 23 Mar 2008 00:05:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JdHSD-0008Lk-9q for emacs-devel@gnu.org; Sun, 23 Mar 2008 00:05:05 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JdHSD-0002b8-4X for emacs-devel@gnu.org; Sun, 23 Mar 2008 00:05:05 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JdHSC-00081g-NK for emacs-pretest-bug@gnu.org; Sun, 23 Mar 2008 00:05:04 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JdHS9-0002ak-Jy for emacs-pretest-bug@gnu.org; Sun, 23 Mar 2008 00:05:04 -0400 Original-Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JdHS9-0002Zs-BF for emacs-pretest-bug@gnu.org; Sun, 23 Mar 2008 00:05:01 -0400 Original-Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m2N44t8t004985; Sun, 23 Mar 2008 00:04:55 -0400 Original-Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m2N44sai004705; Sun, 23 Mar 2008 00:04:54 -0400 Original-Received: from livre.oliva.athome.lsd.ic.unicamp.br (vpn-14-140.rdu.redhat.com [10.11.14.140]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m2N44rtJ016114; Sun, 23 Mar 2008 00:04:54 -0400 Original-Received: from livre.oliva.athome.lsd.ic.unicamp.br (localhost.localdomain [127.0.0.1]) by livre.oliva.athome.lsd.ic.unicamp.br (8.14.2/8.13.8) with ESMTP id m2N44qPk005682; Sun, 23 Mar 2008 01:04:52 -0300 Original-Received: (from aoliva@localhost) by livre.oliva.athome.lsd.ic.unicamp.br (8.14.2/8.13.5/Submit) id m2N44pk3005680; Sun, 23 Mar 2008 01:04:51 -0300 In-Reply-To: <87abkqo33m.fsf@stupidchicken.com> (Chong Yidong's message of "Sat\, 22 Mar 2008 17\:34\:05 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:93242 gmane.emacs.pretest.bugs:21664 Archived-At: On Mar 22, 2008, Chong Yidong wrote: >> - re_char *old_buffer = bufp->buffer; \ >> + unsigned char *old_buffer = bufp->buffer; \ > What is the purpose of this? Compiler warning avoidance. b is unsigned char *, whereas re_char is const unsigned char *. I suppose it would be enough for new_buffer to be non-const, but these buffers are not const anyway, and the constness doesn't buy much at this point. -- Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/ FSF Latin America Board Member http://www.fsfla.org/ Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org} Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}