Re: [Java Spec Report] Re: Infinite loop created by javac

Neal Gafter <[email protected]> Fri, 30 Jul 2004 12:35:06 -0700
Newsgroups gmane.comp.java.spec-report
Message-ID <[email protected]>
On Fri, 30 Jul 2004 15:18:11 -0000, danhicksbyron
<[email protected]> wrote:
> But the JVM spec requires that the monitorexit throw exceptions in two
> cases where nothing can ever be unlocked -- null pointer and no lock
> held on the object.  Never mind how the situation got broken (possibly
> by a JNI routine or non-javac code), this construct is essentially
> guaranteeing an infinite loop.

If you look at the generated code, you'll see that the null pointer
can't happen because the monitor enter didn't throw a null pointer
exception on the same reference value.

It is certainly true that you can write and invoke JNI code or code
from a broken compiler that when executed causes the thread to enter
an infinite loop.  In fact, you can simply write an infinite loop in
Java if you want.  That doesn't bother me.


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/5cFolB/TM
--------------------------------------------------------------------~-> 

To unsubscribe from this mailing list, send an email to:
[email protected]
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/java-spec-report/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/