From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: valid_pointer_p Date: Sun, 06 Aug 2006 06:29:11 +0300 Message-ID: References: Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1154834979 7013 80.91.229.2 (6 Aug 2006 03:29:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 6 Aug 2006 03:29:39 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 06 05:29:34 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G9ZKR-0003QY-I6 for ged-emacs-devel@m.gmane.org; Sun, 06 Aug 2006 05:29:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G9ZKR-0000aX-2W for ged-emacs-devel@m.gmane.org; Sat, 05 Aug 2006 23:29:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G9ZKE-0000a5-FG for emacs-devel@gnu.org; Sat, 05 Aug 2006 23:29:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G9ZKC-0000Xz-LC for emacs-devel@gnu.org; Sat, 05 Aug 2006 23:29:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G9ZKC-0000Xv-F8 for emacs-devel@gnu.org; Sat, 05 Aug 2006 23:29:12 -0400 Original-Received: from [192.114.186.73] (helo=heller.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G9ZO7-0000vb-NE for emacs-devel@gnu.org; Sat, 05 Aug 2006 23:33:15 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-31-3.inter.net.il [80.230.31.3]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id AEA44240 (AUTH halo1); Sun, 6 Aug 2006 06:29:10 +0300 (IDT) Original-To: storm@cua.dk (Kim F. Storm) In-reply-to: (storm@cua.dk) 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:58137 Archived-At: > Cc: emacs-devel@gnu.org > From: storm@cua.dk (Kim F. Storm) > Date: Sun, 06 Aug 2006 00:11:30 +0200 > > > Btw, you always try to validate a 16-byte region starting at the > > address P, which might give a false positive if the object is actually > > smaller and happens to be at the end of an allocated page which is > > followed by a page that we cannot access. Am I missing something? > > I validate a 16 area since the pointer is typically something > "vector-like" where the code that access/print that object will look > at data following the immedate byte/word that the pointer addresses. Well, I figured that much. But we do know the length of each object, so we could validate exactly what is needed, right? Just add another argument to valid_pointer_p that tells it how many bytes to validate.