RFR(S): 8214862: assert(proj != __null) at compile.cpp:3251

Vladimir Kozlov vladimir.kozlov at oracle.com
Mon Jan 7 16:02:55 UTC 2019


On 12/13/18 1:49 AM, Roland Westrelin wrote:
> 
>> Do you hit next bailout (with fix)?:
>>
>> http://hg.openjdk.java.net/jdk/jdk/file/24525070d934/src/hotspot/share/opto/compile.cpp#l3669
> 
> yes.
> 
>> Is fall-through path eliminated because it is not reachable from Root because of infinite loop?
> 
> yes.
> 
>> I think we should detect infinite loop very early, after first PhaseRemoveUseless. Or may be just before or during
>> PhaseRemoveUseless when we still have path.
> 
> Isn't there a chance that the path that leads to the infinite loop can
> be optimized out during optimizations so bailing out early could cause a
> valid method to never be compiled?

It could be.  It seems your solution is simplest one. I agree with it.

Thanks,
vladimir

> 
>> What happens if a method has *only* infinite loop? In which phase we detect it and bailout?
> 
> This:
> 
> private static void test() {
>      while (true);
> }
> 
> bails out in:
> 
> bool Compile::final_graph_reshaping() {
>    // an infinite loop may have been eliminated by the optimizer,
>    // in which case the graph will be empty.
>    if (root()->req() == 1) {
>      record_method_not_compilable("trivial infinite loop");
>      return true;
>    }
> 
> 
> Roland.
> 


More information about the hotspot-compiler-dev mailing list