From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Willing to debug bug #3542 (23.0.94; File access via UNC path slow again under Windows) Date: Mon, 13 Jul 2009 20:54:14 -0400 Message-ID: References: <7dbe73ed0907051401o26903ca3t9a67060f3a3417ad@mail.gmail.com> <83fxda1pef.fsf@gnu.org> <7dbe73ed0907060038w53699f77ie742996955ae8118@mail.gmail.com> <838wj11sz4.fsf@gnu.org> <83my7fz09s.fsf@gnu.org> <7dbe73ed0907081347q12dfd1a2lbbff915c49362f75@mail.gmail.com> <4A55D68D.8050407@gnu.org> <7dbe73ed0907090453s3e125b4ar142b90a268b105e2@mail.gmail.com> <7DAFC004A33C486A9E29A59689E7F02E@us.oracle.com> <4A5619F5.8010008@gnu.org> <8363e1zoak.fsf@gnu.org> <83hbxjrmue.fsf@gnu.org> <83ws6cqudb.fsf@gnu.org> <83tz1gqr33.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1247532869 29243 80.91.229.12 (14 Jul 2009 00:54:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jul 2009 00:54:29 +0000 (UTC) Cc: Andreas Schwab , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 14 02:54:21 2009 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 1MQWHl-0007VU-En for ged-emacs-devel@m.gmane.org; Tue, 14 Jul 2009 02:54:21 +0200 Original-Received: from localhost ([127.0.0.1]:47972 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQWHl-0004ay-3F for ged-emacs-devel@m.gmane.org; Mon, 13 Jul 2009 20:54:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQWHg-0004Z6-BJ for emacs-devel@gnu.org; Mon, 13 Jul 2009 20:54:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQWHa-0004Rs-CL for emacs-devel@gnu.org; Mon, 13 Jul 2009 20:54:14 -0400 Original-Received: from [199.232.76.173] (port=37897 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQWHa-0004RR-7a for emacs-devel@gnu.org; Mon, 13 Jul 2009 20:54:10 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:27593) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MQWHY-0001C4-Aw; Mon, 13 Jul 2009 20:54:08 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar0EAEx0W0pMCpbp/2dsb2JhbACBUc1YhAkFhmo X-IronPort-AV: E=Sophos;i="4.42,393,1243828800"; d="scan'208";a="41521972" Original-Received: from 76-10-150-233.dsl.teksavvy.com (HELO pastel.home) ([76.10.150.233]) by ironport2-out.teksavvy.com with ESMTP; 13 Jul 2009 20:54:04 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 08B187EF7; Mon, 13 Jul 2009 20:54:14 -0400 (EDT) In-Reply-To: <83tz1gqr33.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 13 Jul 2009 23:13:20 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:112436 Archived-At: > Aha. But it sounds like it's not just me who is confused. Here's > just two examples: > From doc.c: > strp = SDATA (string); > while (strp < SDATA (string) + SBYTES (string)) > (why not "while *strp"?) As said Andreas, this would stop at the first NUL, which may appear within the string. > From fileio.c: > nm = (unsigned char *) alloca (SBYTES (filename) + 1); > bcopy (SDATA (filename), nm, SBYTES (filename) + 1); > (why +1? it potentially accesses memory beyond end of `filename's > contents) The +1 is precisely used to make sure we copy the terminating NUL. Stefan