Skip to content

Fix buffer size for reading processor core id#352

Merged
GregoryComer merged 1 commit intopytorch:mainfrom
redwanulsourav:fix_buffer_size_processor_core_id
Jan 30, 2026
Merged

Fix buffer size for reading processor core id#352
GregoryComer merged 1 commit intopytorch:mainfrom
redwanulsourav:fix_buffer_size_processor_core_id

Conversation

@redwanulsourav
Copy link
Copy Markdown
Contributor

  • In cpuinfo_linux_get_processor_core_id, snprintf is called with buffer size CORE_ID_FILENAME_SIZE.
  • But the buffer array is created with size PACKAGE_ID_FILENAME_SIZE.

This PR fixes the array size to CORE_ID_FILENAME_SIZE.

@meta-cla meta-cla Bot added the cla signed label Dec 7, 2025
Copy link
Copy Markdown
Collaborator

@fbarchard fbarchard left a comment

Choose a reason for hiding this comment

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

Thanks for spotting the wrong name

@fbarchard
Copy link
Copy Markdown
Collaborator

This bug fix still looks good to me.

@GregoryComer
Copy link
Copy Markdown
Member

@redwanulsourav Can you rebase the PR? I can go ahead and merge it if CI is clean post-rebase.

@redwanulsourav
Copy link
Copy Markdown
Contributor Author

@redwanulsourav Can you rebase the PR? I can go ahead and merge it if CI is clean post-rebase.

Yes! I am working on it.

@redwanulsourav redwanulsourav force-pushed the fix_buffer_size_processor_core_id branch from 5ddceba to a8d15cf Compare January 30, 2026 04:23
@redwanulsourav
Copy link
Copy Markdown
Contributor Author

@GregoryComer I rebased the PR onto the latest main. Could you please take another look and confirm everything looks good?

@GregoryComer
Copy link
Copy Markdown
Member

CI looks good. I'll go ahead and merge. Thanks for the fix!

@GregoryComer GregoryComer merged commit 84818a4 into pytorch:main Jan 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants