This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: backtrace() vs. _Unwind_Backtrace()


Hi,

On Mon, 2003-12-08 at 21:08, Bryce McKinlay wrote:
> On Dec 9, 2003, at 12:33 AM, Andrew Haley wrote:
> >
> > All we need is a method that maps pc->name.  We know that we can use
> > addr2line to do that, and we are about to get a demangler that we can
> > link into libgcj.
> 
> It needs to map pc->Class/_Jv_Method, not just a name. Mapping to a 
> name (eg symbol lookup/demangling) is insufficient because different 
> classes, with different privileges, can have the same name. Someone 
> could, for example, name their class java.lang.Whatever and potentially 
> bypass security checks.
> 
> Admittedly this problem only really applies to security checks and not 
> diagnostic stack traces, but I think its better to pursue a solution 
> that works for everything.

And selecting the correct ClassLoader! This is needed at a couple of
places in the library to make sure a Class is loaded from the same
ClassLoader as the calling Class of a method.

Cheers,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]