Integer overflow in _Jv_CondWait
Andrew Haley
aph@redhat.com
Wed Nov 23 18:46:00 GMT 2005
Boehm, Hans writes:
> Note that as of Java 5, it is always acceptable for Object.wait() to
> return early. Hence the original behavior was a severe performance bug,
> but technically correct, unless we use _Jv_CondWait with different
> assumptions internally. (Apparently a lot of pre-1.5 implementations
> also exhibit this behavior. But the bugs were fixed by a spec change in
> 1.5. And I think the 1.5 spec is probably the correct one.)
It's the "severe performance bug" part that people were complaining
about. :-)
> By the same token, it would probably be slightly preferable to turn an
> overflow into the longest possible finite wait.
That's what I first wrote, but then I changed it because I convinced
myself it didn't matter. I'm rather hoping that when the UNIX epoch
rolls over, any POSIX threads implementations still in use will have
changed this field into a long ...
Andrew.
More information about the Java-patches
mailing list