Bug 4048 - BUG: potential integer overflow on shift of a int
Summary: BUG: potential integer overflow on shift of a int
Status: RESOLVED FIXED
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: X86 (show other bugs) X86
Version: 5.10.y-13
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Guanjun
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-13 11:11 UTC by ljubomir
Modified: 2023-02-28 19:37 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ljubomir inspur_group 2023-02-13 11:11:22 UTC
Description of problem:
The left shift of int 32 bit integer constant 1 is evaluated using 32 bit
arithmetic and then passed as a 64 bit function argument. In the case where
i is 32 or more this can lead to an overflow.  Avoid this by shifting
using the BIT_ULL macro instead.

upstream 08245672cdc6505550d1a5020603b0a8d4a6dcc7已经修复了该问题
Comment 1 maqiao alibaba_cloud_group 2023-02-28 19:37:27 UTC
merged: https://gitee.com/anolis/cloud-kernel/pulls/1179