Skip to content

fix crash in frequency benchmark table rendering when mismatch in core counts #407

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

Merged
merged 1 commit into from
Jul 3, 2025

Conversation

harp-intel
Copy link
Contributor

No description provided.

@harp-intel harp-intel requested a review from Copilot July 3, 2025 13:26
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR prevents crashes when the number of cores in the first die differs by padding and guarding against index out-of-range during table rendering.

  • Pad specSSEFreqs to match scalarIaddFreqs length
  • Add boundary checks when appending values for each frequency field
Comments suppressed due to low confidence (2)

internal/report/table_defs.go:2080

  • Add a unit test where specSSEFreqs is shorter than scalarIaddFreqs to validate padding and prevent regressions.
		// pad the spec frequencies with the last value if they are shorter than the scalar_iadd frequencies

internal/report/table_defs.go:2084

  • Cannot range over integer diff. Replace with a classic for-loop, e.g., for i := 0; i < diff; i++ { ... }.
			for range diff {

@harp-intel harp-intel linked an issue Jul 3, 2025 that may be closed by this pull request
@harp-intel harp-intel merged commit f35fc8d into main Jul 3, 2025
4 checks passed
@harp-intel harp-intel deleted the freqbenchcrash branch July 3, 2025 19:51
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.

Crash in frequency benchmark report generation on GNR
1 participant