Quantcast

[10] RFR(XS): 8180587: Assert in layout_helper_log2_element_size(jint) compares bits instead of bytes

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[10] RFR(XS): 8180587: Assert in layout_helper_log2_element_size(jint) compares bits instead of bytes

Tobias Hartmann-2
Hi,

please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8180587
http://cr.openjdk.java.net/~thartmann/8180587/webrev.00/

While working on value types, I wondered that the "l2esz <= LogBitsPerLong" assert in layout_helper_log2_element_size() did not fire although the array element size of a value type is greater than the size of a long. The problem is that the assert compares the log2 element size which is in bytes (see initialization in Klass::array_layout_helper()) to LogBitsPerLong which obviously is in bits.

Thanks,
Tobias
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR(XS): 8180587: Assert in layout_helper_log2_element_size(jint) compares bits instead of bytes

Zoltán Majó
Hi Tobias,


the proposed change looks good to me.

Thank you!

Best regards,


Zoltan


On 05/18/2017 09:47 AM, Tobias Hartmann wrote:

> Hi,
>
> please review the following patch:
> https://bugs.openjdk.java.net/browse/JDK-8180587
> http://cr.openjdk.java.net/~thartmann/8180587/webrev.00/
>
> While working on value types, I wondered that the "l2esz <= LogBitsPerLong" assert in layout_helper_log2_element_size() did not fire although the array element size of a value type is greater than the size of a long. The problem is that the assert compares the log2 element size which is in bytes (see initialization in Klass::array_layout_helper()) to LogBitsPerLong which obviously is in bits.
>
> Thanks,
> Tobias

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR(XS): 8180587: Assert in layout_helper_log2_element_size(jint) compares bits instead of bytes

Tobias Hartmann-2
Hi Zoltan,

thanks for the review!

Best regards,
Tobias

On 18.05.2017 16:50, Zoltán Majó wrote:

> Hi Tobias,
>
>
> the proposed change looks good to me.
>
> Thank you!
>
> Best regards,
>
>
> Zoltan
>
>
> On 05/18/2017 09:47 AM, Tobias Hartmann wrote:
>> Hi,
>>
>> please review the following patch:
>> https://bugs.openjdk.java.net/browse/JDK-8180587
>> http://cr.openjdk.java.net/~thartmann/8180587/webrev.00/
>>
>> While working on value types, I wondered that the "l2esz <= LogBitsPerLong" assert in layout_helper_log2_element_size() did not fire although the array element size of a value type is greater than the size of a long. The problem is that the assert compares the log2 element size which is in bytes (see initialization in Klass::array_layout_helper()) to LogBitsPerLong which obviously is in bits.
>>
>> Thanks,
>> Tobias
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR(XS): 8180587: Assert in layout_helper_log2_element_size(jint) compares bits instead of bytes

Vladimir Kozlov
In reply to this post by Zoltán Majó
On 5/18/17 7:50 AM, Zoltán Majó wrote:
> Hi Tobias,
>
> the proposed change looks good to me.

+1

Vladimir

>
> Thank you!
>
> Best regards,
>
>
> Zoltan
>
>
> On 05/18/2017 09:47 AM, Tobias Hartmann wrote:
>> Hi,
>>
>> please review the following patch:
>> https://bugs.openjdk.java.net/browse/JDK-8180587
>> http://cr.openjdk.java.net/~thartmann/8180587/webrev.00/
>>
>> While working on value types, I wondered that the "l2esz <= LogBitsPerLong" assert in
>> layout_helper_log2_element_size() did not fire although the array element size of a value type is greater than the
>> size of a long. The problem is that the assert compares the log2 element size which is in bytes (see initialization in
>> Klass::array_layout_helper()) to LogBitsPerLong which obviously is in bits.
>>
>> Thanks,
>> Tobias
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR(XS): 8180587: Assert in layout_helper_log2_element_size(jint) compares bits instead of bytes

Tobias Hartmann-2
Hi Vladimir,

thanks for the review!

Best regards,
Tobias

On 18.05.2017 19:06, Vladimir Kozlov wrote:

> On 5/18/17 7:50 AM, Zoltán Majó wrote:
>> Hi Tobias,
>>
>> the proposed change looks good to me.
>
> +1
>
> Vladimir
>
>>
>> Thank you!
>>
>> Best regards,
>>
>>
>> Zoltan
>>
>>
>> On 05/18/2017 09:47 AM, Tobias Hartmann wrote:
>>> Hi,
>>>
>>> please review the following patch:
>>> https://bugs.openjdk.java.net/browse/JDK-8180587
>>> http://cr.openjdk.java.net/~thartmann/8180587/webrev.00/
>>>
>>> While working on value types, I wondered that the "l2esz <= LogBitsPerLong" assert in
>>> layout_helper_log2_element_size() did not fire although the array element size of a value type is greater than the
>>> size of a long. The problem is that the assert compares the log2 element size which is in bytes (see initialization in
>>> Klass::array_layout_helper()) to LogBitsPerLong which obviously is in bits.
>>>
>>> Thanks,
>>> Tobias
>>
Loading...