New stack trace code
Bryce McKinlay
mckinlay@redhat.com
Fri Mar 11 21:14:00 GMT 2005
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
More information about the Java-patches
mailing list