This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
walking the stack
- From: Anthony Green <green at redhat dot com>
- To: java at gcc dot gnu dot org
- Date: 15 Apr 2002 01:14:26 -0700
- Subject: walking the stack
I've been experimenting with an implementation of the Java's sandbox
design.
The idea is to map ProtectionDomains to PC ranges. I determine PC
ranges by modifying libgcj.spec to link jrtbegin.o and jrtend.o before
and after all other files. These object files contain the bits
necessary to determine the range of code needing registration with the
runtime. For interpreted code I just need to register the closure stub.
Running a check for a priviliged action involves walking the stack and
examining the details of the appropriate ProtectionDomains along the
way. My current experiments involve using glibc's backtrace()
function. My questions...
1) Is this reliable on all glibc ports?
2) Is there some better way to get stack trace info? Like using the
DWARF2 data if it exists.
3) Is there a better way to do all of this?
Thanks,
AG