'thread stack pointer out of range'? -- solved?

Boehm, Hans hans_boehm@hp.com
Mon Jul 1 22:24:00 GMT 2002


Unfortunately, I think you understand correctly.  Can you try taking out the conditional ABORT, and verify that does the right thing?  That was my mistake in translating the patch from my tree.

Hans

-----Original Message-----
From: Adam Megacz
To: Boehm, Hans
Cc: '''java@gcc.gnu.org' ' '
Sent: 7/1/02 3:47 PM
Subject: Re: 'thread stack pointer out of range'? -- solved?


"Boehm, Hans" <hans_boehm@hp.com> writes:
> I've attached a patch against the 3.1 tree.  This isn't exactly the
> patch I received, and it hasn't been tested.  Thus I'd prefer if
> this had some miles on it before it was checked into the 3.1 tree.
> Could you try it?

So I just got the "Thread Stack Pointer Out Of Range" dialog. Argh. I
checked the patch:

          if (thread_table[i].context.Esp >=
(DWORD)thread_table[i].stack
              || thread_table[i].context.Esp < (DWORD)bottom)
              ABORT("Thread stack pointer out of range");
          GC_push_one ((word) thread_table[i].context.Edi);
          GC_push_one ((word) thread_table[i].context.Esi);
          GC_push_one ((word) thread_table[i].context.Ebp);
          GC_push_one ((word) thread_table[i].context.Ebx);
          GC_push_one ((word) thread_table[i].context.Edx);
          GC_push_one ((word) thread_table[i].context.Ecx);
          GC_push_one ((word) thread_table[i].context.Eax);
          if (thread_table[i].context.Esp >=
(DWORD)thread_table[i].stack
              || thread_table[i].context.Esp < (DWORD)bottom) {
              WARN("Thread stack pointer 0x%lx out of range, pushing
everything",
                   thread_table[i].context.Esp);
              GC_push_all_stack((char *) bottom, thread_table[i].stack);
          } else {
              GC_push_all_stack((char *) thread_table[i].context.Esp,
                                thread_table[i].stack);
          }

Are you sure that the first if-block shouldn't be removed? It seems
that the WARN() is unreachable -- it will only be encountered if the
condition inside the if() is met, but if that condition is met, the GC
would have ABORT()ed at the top of the block above.

Or perhaps I misunderstand how this works.

  - a



More information about the Java mailing list