This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: 'thread stack pointer out of range'? -- solved?
- From: Adam Megacz <gcj at lists dot megacz dot com>
- To: "Boehm, Hans" <hans_boehm at hp dot com>
- Cc: "'''java at gcc dot gnu dot org' ' '" <java at gcc dot gnu dot org>
- Date: 01 Jul 2002 15:47:16 -0700
- Subject: Re: 'thread stack pointer out of range'? -- solved?
- Organization: Myself
- References: <40700B4C02ABD5119F000090278766443BF459@hplex1.hpl.hp.com>
"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