RFR: 8294438: Fix misleading-indentation warnings in hotspot
    David Holmes 
    dholmes at openjdk.org
       
    Wed Sep 28 02:12:20 UTC 2022
    
    
  
On Tue, 27 Sep 2022 10:28:54 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> There are number of places where misleading-indentation is reported by GCC. Currently, the warning is disabled for the entirety of Hotspot, which is not good.
> 
> C1 does an unusual style here. Changing it globally would touch a lot of lines. Instead of doing that, I fit the existing style while also resolving the warnings. Note this actually solves a bug in `lir_alloc_array`, where `do_temp` are called without a check.
> 
> Build-tested this with product of:
>   - GCC 10
>   - {i686, x86_64, aarch64, powerpc64le, s390x, armhf, riscv64}
>   - {server, zero}
>   - {release, fastdebug}
> 
> Linux x86_64 fastdebug `tier1` is fine.
Changes look good!
That C1 code is very strangely written!
Thanks
src/hotspot/share/classfile/javaClasses.cpp line 3926:
> 3924:   if (k == NULL)  return NULL;
> 3925:   InstanceKlass* ik = InstanceKlass::cast(k);
> 3926:   if (!ik->is_initialized())  ik->initialize(CHECK_NULL);
That's actually a bug!
-------------
Marked as reviewed by dholmes (Reviewer).
PR: https://git.openjdk.org/jdk/pull/10444
    
    
More information about the build-dev
mailing list