Skip to content

Conversation

@apop5
Copy link
Collaborator

@apop5 apop5 commented Feb 6, 2026

Description

When calling DecodeUefiLog, if the system was not able to provide a frequency in the log, it will be reported as 0. With no verification check of a zero frequency, DecodeUefiLog would attempt a divide by zero when converting time to nano seconds.

Add a check that prevents divide by zero. This will report times of 0 for all timestamps in the decoded log.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

On a physical platform where no timer frequency was reported, encountered a python exception.
After change, log was correctly retrieved and displays a timestamp of 0.

Integration Instructions

No integration necessary.

@apop5 apop5 requested review from kuqin12 and makubacki February 6, 2026 17:58
@mu-automation mu-automation bot added language:python Pull requests that update Python code impact:non-functional Does not have a functional impact labels Feb 6, 2026
@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/202502@a55e779). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release/202502    #824   +/-   ##
================================================
  Coverage                  ?   4.71%           
================================================
  Files                     ?      36           
  Lines                     ?    4199           
  Branches                  ?     276           
================================================
  Hits                      ?     198           
  Misses                    ?    3999           
  Partials                  ?       2           
Flag Coverage Δ
AdvLoggerPkg 4.71% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

When calling DecodeUefiLog, if the system was not able to provide a frequency
in the log, it will be reported as 0. With no verification check of
a zero frequency, DecodeUefiLog would attempt a divide by zero when
converting time to nano seconds.

Add a check that prevents divide by zero. This will report times of 0
for all timestamps in the decoded log.
@makubacki makubacki force-pushed the personal/apop5/decodelogfix branch from 5cb176b to aa971ee Compare February 6, 2026 20:29
@makubacki makubacki enabled auto-merge (squash) February 6, 2026 20:30
@makubacki
Copy link
Member

@apop5, I went ahead and rebased with autocomplete so I can rebase my PR on the Python script change.

@makubacki makubacki merged commit bdfdeac into microsoft:release/202502 Feb 6, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:non-functional Does not have a functional impact language:python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants