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'?


[[ regarding Win32 API calls that use SP for stuff other than the ]]
[[ stack pointer -- this confuses the GC                          ]]

"Boehm, Hans" <hans_boehm@hp.com> writes:
> I'm open to suggestions as to what to do here.  My impression was
> that the issue is mostly with third-party (not necessarily
> Microsoft) libraries that decide to use the stack pointer as a
> temporary register for the duration of some inner loop.

I can confirm that this occurs when linking only against GDI32,
WSOCK32, WS2_32, and COMDLG32, all part of Microsoft Windows. This is
on Win98, by the way. I've posted to discuss@xwt.org to see if anybody
has seen it on NT derivitaves; I will report back when I hear from the
users.

> You could try to give up and restart it if you don't like the pc
> value.  But I'm not sure how you recognize that the pc is in a
> hand-coded routine that might mess with the sp.

Could we assume that any PC outside the .exe's image is unsafe? In
other words, never GC if any thread is in a DLL? This is probably
overly conservative, but I can't think of anything else.

> Can you look at the failure case with a debugger?

Sadly I cannot get the error to happen -- it has only happened to me
about ten or twenty times during the last five months of heavy
development and testing of XWT.

> and that the wrapped routines can't block.

That's going to be a problem -- this error is most common during XWT's
startup phase, when it's downloading from the net. This leads me to
believe that it may be the socket read()/write() routines that are
doing this.

  - a

-- 
Sick of HTML user interfaces?
www.xwt.org

"disappointing retail sales figures suggest to some that America's love
 affair with retail therapy may be over."    -- _The Economist_, 19-Jun


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