Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-23391][CORE]It may lead to overflow for some integer multiplication #20581

Closed
wants to merge 1 commit into from

Conversation

10110346
Copy link
Contributor

@10110346 10110346 commented Feb 12, 2018

What changes were proposed in this pull request?

In the getBlockData,blockId.reduceId is the Int type, when it is greater than 2^28, blockId.reduceId*8 will overflow
In the decompress0, len and unitSize are Int type, so len * unitSize may lead to overflow

How was this patch tested?

N/A

@srowen
Copy link
Member

srowen commented Feb 12, 2018

Hm, why was this not part of the previous PR?

@10110346
Copy link
Contributor Author

@srowen I am sorry, i didn't notice this place, i found it yesterday.

@10110346
Copy link
Contributor Author

@srowen I will check all of our code.

@10110346 10110346 changed the title [SPARK-23358][CORE][FOLLOW-UP]When reduceId is greater than 2^28, reduceId*8 will overflow [SPARK-23391][CORE]It may lead to overflow for some integer multiplication Feb 12, 2018
@SparkQA
Copy link

SparkQA commented Feb 12, 2018

Test build #87315 has finished for PR 20581 at commit 0d3884a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Feb 12, 2018

Test build #87316 has finished for PR 20581 at commit d590768.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

asfgit pushed a commit that referenced this pull request Feb 12, 2018
…cation

## What changes were proposed in this pull request?
In the `getBlockData`,`blockId.reduceId` is the `Int` type, when it is greater than 2^28, `blockId.reduceId*8` will overflow
In the `decompress0`, `len` and  `unitSize` are  Int type, so `len * unitSize` may lead to  overflow
## How was this patch tested?
N/A

Author: liuxian <liu.xian3@zte.com.cn>

Closes #20581 from 10110346/overflow2.

(cherry picked from commit 4a4dd4f)
Signed-off-by: Sean Owen <sowen@cloudera.com>
asfgit pushed a commit that referenced this pull request Feb 12, 2018
…cation

In the `getBlockData`,`blockId.reduceId` is the `Int` type, when it is greater than 2^28, `blockId.reduceId*8` will overflow
In the `decompress0`, `len` and  `unitSize` are  Int type, so `len * unitSize` may lead to  overflow
N/A

Author: liuxian <liu.xian3@zte.com.cn>

Closes #20581 from 10110346/overflow2.

(cherry picked from commit 4a4dd4f)
Signed-off-by: Sean Owen <sowen@cloudera.com>
@srowen
Copy link
Member

srowen commented Feb 12, 2018

Merged to master/2.3/2.2

@asfgit asfgit closed this in 4a4dd4f Feb 12, 2018
MatthewRBruce pushed a commit to Shopify/spark that referenced this pull request Jul 31, 2018
…cation

In the `getBlockData`,`blockId.reduceId` is the `Int` type, when it is greater than 2^28, `blockId.reduceId*8` will overflow
In the `decompress0`, `len` and  `unitSize` are  Int type, so `len * unitSize` may lead to  overflow
N/A

Author: liuxian <liu.xian3@zte.com.cn>

Closes apache#20581 from 10110346/overflow2.

(cherry picked from commit 4a4dd4f)
Signed-off-by: Sean Owen <sowen@cloudera.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants