Skip to content

Fix Undefined behavior from signed bit shifts#337

Closed
rocm-devops wants to merge 7 commits intoamd-stagingfrom
sclement/SWDEV-532853
Closed

Fix Undefined behavior from signed bit shifts#337
rocm-devops wants to merge 7 commits intoamd-stagingfrom
sclement/SWDEV-532853

Conversation

@rocm-devops
Copy link

No description provided.

fcui-amd and others added 7 commits June 13, 2025 09:49
Bit shift operations on signed numbers should not shift into or beyond
the signed bit as this results in Undefined Behaviour.

Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>
Bit Shifting an unsigned integer is undefined behavior.

BUG: SWDEV-532853

Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>
Bit shifting signed integers into or beyond the sign bit is undefined.

Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>
Changing the signed integers in the macro expressions throughout the file
to avoid overflow.

Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>
@amd-hsivasun
Copy link

Imported to rocm-systems

@jayhawk-commits jayhawk-commits deleted the sclement/SWDEV-532853 branch August 11, 2025 20:56
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.

4 participants