This is the mail archive of the java-patches@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: New stack trace code


Andrew Haley wrote:

I've found a few problems.

We're not marking the line table in boehm.cc:


Doh, manual marking bites again!

Index: boehm.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/boehm.cc,v
retrieving revision 1.45
diff -u -r1.45 boehm.cc
--- boehm.cc    25 Nov 2004 03:46:53 -0000      1.45
+++ boehm.cc    11 Mar 2005 18:52:31 -0000
@@ -289,6 +289,8 @@
                   = (_Jv_InterpMethod *) ic->interpreted_methods[i];
                 if (im)
                   {
+                     p = (GC_PTR) im->line_table;
+                     MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, ic);
                     p = (GC_PTR) im->prepared;
                     MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, ic);
                   }

Also, the calls to _Jv_AllocBytes in stacktrace.cc are potentially
problematic: unless they're rechable from somewhere we scan, the
memory may be freed before it gets used.


The pointers are always kept on the stack, I think, so should be marked fine - but I'll check this and maybe add a comment.

Bryce


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