This is the mail archive of the java@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: '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


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