Skip to content

[backport][rls-v3.11] fix: common: memory_desc: add upper bounds check for md tensor dimensions#4852

Open
avmanerikar wants to merge 2 commits intorls-v3.11from
amanerik/rls-v3.11/fix-md-size-overflow-bkp
Open

[backport][rls-v3.11] fix: common: memory_desc: add upper bounds check for md tensor dimensions#4852
avmanerikar wants to merge 2 commits intorls-v3.11from
amanerik/rls-v3.11/fix-md-size-overflow-bkp

Conversation

@avmanerikar
Copy link
Contributor

Description

Backport of PR #4745.
Also backports commit a478090 from PR #4779 to use is_runtime_value() in the fix.

@avmanerikar avmanerikar requested review from a team as code owners March 18, 2026 19:59
@github-actions github-actions bot added platform:cpu-x64 Intel64/AMD64 processors. Codeowner: @oneapi-src/onednn-cpu-x64 platform:cpu-aarch64 Codeowner: @oneapi-src/onednn-cpu-aarch64 backport component:common labels Mar 18, 2026
@avmanerikar
Copy link
Contributor Author

make test
set test_scope=NIGHTLY

// computation does not trigger a overflow during memory creation.
dim_t prod = 1;
for (int d = 0; d < ndims; ++d) {
if (dims[d] != DNNL_RUNTIME_DIM_VAL) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (dims[d] != DNNL_RUNTIME_DIM_VAL) {
if (!is_runtime_value(dims[d])) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport component:common platform:cpu-aarch64 Codeowner: @oneapi-src/onednn-cpu-aarch64 platform:cpu-x64 Intel64/AMD64 processors. Codeowner: @oneapi-src/onednn-cpu-x64

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants