[14] RFR(S): 8225653: Provide more information when hitting SIGILL from HaltNode

Christian Hagedorn christian.hagedorn at oracle.com
Mon Sep 9 14:38:31 UTC 2019


Hi Vladimir

On 09.09.19 15:30, Vladimir Ivanov wrote:
> 
>> http://cr.openjdk.java.net/~chagedorn/8225653/webrev.02/
> 
> src/hotspot/share/opto/node.hpp:
> 
>     void init_class_id(jushort c) {
> -    assert(c <= _max_classes, "invalid node class");
>       _class_id = c; // cast out const
> 
> I'd keep the assert as is just in case the number of supported cases is 
> extended or some classes are removed in the future. Or does it cause 
> compilation failures?
> 

It causes compilation failures:
/home/christian/jdk/open/src/hotspot/share/opto/node.hpp:752:14: error: 
comparison is always true due to limited range of data type 
[-Werror=type-limits]
      assert(c <= _max_classes, "invalid node class");
             ~~^~~~~~~~~~~~~~~

_max_classes has the value of ClassMask_Halt assigned which equals the 
max value for jushort. Therefore, the assert would be always true.

Best regards,
Christian


More information about the hotspot-compiler-dev mailing list