Preliminary patch: New stack trace infrastructure

Andrew Haley aph@redhat.com
Mon Nov 29 17:31:00 GMT 2004


Bryce McKinlay writes:
 > There is still some cleanup work to be done and missing pieces to be 
 > filled in (most noteably, AccessController), but here is a preliminary 
 > snapshot of the new stack trace infrastructure code.
 > 
 > Basically, this code will give clean looking, accurate stack traces 
 > using the DWARF2 debugging information and gcj's compiled metadata.
 > 
 > Key benefits:
 > 
 > - It gives stack traces, complete with line numbers, through interpreted 
 > bytecode (part of this code is based on an earlier implementation from 
 > Mark Wielaard - thanks Mark!)
 > - It gives stack traces through shared libraries. Currently, addr2line 
 > is still used to do this, which can be a noticeable performance problem 
 > when it has to open big libraries like libgcj, but I plan to integrate 
 > Casey Marshall's DWARF2 debug-info reading code soon. For now we may 
 > wish to disable addr2line usage for applications where printStackTrace() 
 > must be fast.
 > - Stack trace implementation is secure: stack frame -> class association 
 > is no longer based on mangled names, so classes wont be able to 
 > illegally elevate their privileges just by being called the same name as 
 > a secure class.
 > - Stack printing looks nicer and is smarter about which frames to 
 > include or exclude.

This looks good, and you submitted it before the Thanksgiving
deadline.  However, we must not cause regressions for non-DWARF2
unwinding hosts.  It looks like Windows users, in particular will be
stuck with sjlj unwinding for some time to come.

What happens to a Windows build when this patch is applied?

Andrew.



More information about the Java-patches mailing list