Skip to content
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

Fix: SFDP basic parameter table handling #7

Merged
merged 4 commits into from
Sep 28, 2023

Conversation

dragonmux
Copy link
Member

Mirroring the fix in BMD PR blackmagic-debug/blackmagic#1599 this PR addresses an oversight and failing in the SFDP implementation which made the tool mis-handle devices that follow old versions of the specification.

The practical upshot of the bug is that we'd use invalid (0-init) data past the end of the extracted basic parameters table to determine the page program size of the device, leading to problems in all downstream uses of this data.

@dragonmux dragonmux added Bug Confirmed bug Action: SFDP Something related to the SFDP support labels Sep 28, 2023
@dragonmux dragonmux added this to the v1.0 milestone Sep 28, 2023
@dragonmux dragonmux requested a review from esden September 28, 2023 18:42
@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

Merging #7 (8b0a45c) into main (6710bc4) will not change coverage.
The diff coverage is 0.00%.

@@          Coverage Diff          @@
##            main      #7   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         30      30           
  Lines       1560    1568    +8     
  Branches     491     495    +4     
=====================================
- Misses      1524    1531    +7     
- Partials      36      37    +1     
Files Coverage Δ
src/include/sfdpInternal.hxx 0.00% <ø> (ø)
src/sfdp.cxx 0.00% <0.00%> (ø)

... and 11 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@esden esden left a comment

Choose a reason for hiding this comment

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

LGTM

@esden esden merged commit f87ad30 into main Sep 28, 2023
34 checks passed
@dragonmux dragonmux deleted the fix/sfdp-basic-parameter-table-handling branch September 28, 2023 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Action: SFDP Something related to the SFDP support Bug Confirmed bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants