This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
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