From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9578 invoked by alias); 17 Oct 2006 18:53:20 -0000 Received: (qmail 9505 invoked by uid 22791); 17 Oct 2006 18:53:19 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 17 Oct 2006 18:53:16 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k9HIrEuw013535 for ; Tue, 17 Oct 2006 14:53:14 -0400 Received: from zebedee.littlepinkcloud.COM (vpn-14-51.rdu.redhat.com [10.11.14.51]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id k9HIrAKa011948; Tue, 17 Oct 2006 14:53:11 -0400 Received: from littlepinkcloud.COM (localhost.localdomain [127.0.0.1]) by zebedee.littlepinkcloud.COM (8.13.6/8.13.5) with ESMTP id k9HIr8g9005853; Tue, 17 Oct 2006 19:53:09 +0100 Received: (from aph@localhost) by littlepinkcloud.COM (8.13.6/8.13.5/Submit) id k9HIr7c4005850; Tue, 17 Oct 2006 19:53:07 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17717.9875.943502.570625@zebedee.pink> Date: Tue, 17 Oct 2006 18:53:00 -0000 From: Andrew Haley To: Keith Seitz Cc: Java Patch List Subject: Re: [RFC/JVMTI] GetMethodDeclaringClass In-Reply-To: <45352422.9050906@redhat.com> References: <45351C48.5070205@redhat.com> <17717.7538.291407.210562@zebedee.pink> <17717.8425.50456.767598@zebedee.pink> <45352422.9050906@redhat.com> X-Mailer: VM 7.19 under Emacs 21.4.1 X-IsSubscribed: yes Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2006-q4/txt/msg00066.txt.bz2 Keith Seitz writes: > Andrew Haley wrote: > > > AFAICS we just need to make sure that all methods for interpreted > > classes are pushed with _Jv_PushClass. Then to get your class, > > > > class = ncodeMap->get (jmethodID->ncode); > > I thought about doing that at one time, but I was (too?) worried about > an invalid jmethodID wreaking havoc. You want to know if a jmethodID really is valid? That it really is a pointer to a _Jv_Method? > Is there a way to guard against something like this or otherwise > validate the jmethodID before dereferencing it? The only way I can think of is by keeping a cache of them. > Perhaps I'm being too paranoid? Sure. I guess you want a debugger to be robust even when the runtime is FUBAR, but this seems a little extreme. Andrew.