Skip to content

Conversation

@psurply
Copy link
Contributor

@psurply psurply commented Jun 12, 2025

The box record payload does not always contain data. Checking if the region is empty during its construction prevents the invalid box payload to appear in the region list stored in the Crash Log struct.

This also prevents the unpack command to report empty regions and the decode function to consider empty files as valid.

$ touch empty.crashlog
$ iclg decode empty.crashlog
Fatal Error: The Crash Log Region is not populated

The box record payload does not always contain data. Checking if the
region is empty during its construction prevents the invalid box payload
to appear in the region list stored in the Crash Log struct.

This also prevents the unpack command to report empty regions and the
decode function to consider empty files as valid.

    $ touch empty.crashlog
    $ iclg decode empty.crashlog
    Fatal Error: The Crash Log Region is not populated

Signed-off-by: Surply, Pierre <[email protected]>
@psurply psurply force-pushed the dev/empty_region branch from 60c2709 to 6daf880 Compare June 13, 2025 20:20
@psurply psurply requested a review from jlrivasp June 13, 2025 20:20
@psurply psurply marked this pull request as ready for review June 13, 2025 20:21
Copy link
Contributor

@jlrivasp jlrivasp left a comment

Choose a reason for hiding this comment

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

It looks good to me, thanks a lot for the PR

@jlrivasp jlrivasp merged commit 8676841 into intel:main Jun 18, 2025
5 checks passed
@psurply psurply deleted the dev/empty_region branch June 18, 2025 12:00
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.

2 participants