[jira] [Updated] (CARBONDATA-2332) Potentially overflowing expression in UnsafeFixLengthColumnPage

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (CARBONDATA-2332) Potentially overflowing expression in UnsafeFixLengthColumnPage

Akash R Nilugal (Jira)

     [ https://issues.apache.org/jira/browse/CARBONDATA-2332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Yu updated CARBONDATA-2332:
-------------------------------
    Description:
Here is one example from getFloatPage :

{code}
    for (int i = 0; i < data.length; i++) {
      long offset = i << floatBits;
{code}
The shift expression with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic.
But the variable offset is of type long.

There are a few other shift expressions of this nature.

  was:
Here is one example from getFloatPage :
{code}
    for (int i = 0; i < data.length; i++) {
      long offset = i << floatBits;
{code}
The shift expression with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic.
But the variable offset is of type long.

There are a few other shift expressions of this nature.


> Potentially overflowing expression in UnsafeFixLengthColumnPage
> ---------------------------------------------------------------
>
>                 Key: CARBONDATA-2332
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-2332
>             Project: CarbonData
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> Here is one example from getFloatPage :
> {code}
>     for (int i = 0; i < data.length; i++) {
>       long offset = i << floatBits;
> {code}
> The shift expression with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic.
> But the variable offset is of type long.
> There are a few other shift expressions of this nature.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)