Skip to content

igvm_defs, igvm: introduce semantic versioning header#128

Draft
SethHollandsworth wants to merge 1 commit into
microsoft:mainfrom
SethHollandsworth:sethho/igvm_version_header
Draft

igvm_defs, igvm: introduce semantic versioning header#128
SethHollandsworth wants to merge 1 commit into
microsoft:mainfrom
SethHollandsworth:sethho/igvm_version_header

Conversation

@SethHollandsworth

Copy link
Copy Markdown

This pull request adds support for an IGVM file version header, allowing the version of the file contents to be described using a major.minor.patch triple. At most one version header is allowed per file, and merge logic ensures that versions match.

IGVM Version Header Support

  • Added the IGVM_VHS_IGVM_VERSION struct and corresponding header type IGVM_VHT_IGVM_VERSION to represent the file version (major.minor.patch). This header is only allowed once per file and must be 8-byte aligned.
  • Updated IgvmInitializationHeader and related logic to support parsing, serializing, and validating the new version header, including ensuring that only one is present and that the reserved field is zero.

File Merge Logic

  • Modified IgvmFile::merge to ensure that if both files have a version header, they must match exactly; otherwise, merging fails with a new error. Only one version header is retained in the merged file.

Error Handling

  • Introduced new error variants: MultipleIgvmVersions for multiple version headers in one file, and MergeIgvmVersionMismatch for mismatched versions during merge.

Testing

  • Added tests for the version header covering serialization, deserialization, reserved field validation, singleton enforcement, and merge behavior.

These changes ensure IGVM files can explicitly declare their version, and that this information is consistently enforced and preserved during file operations.

@SethHollandsworth
SethHollandsworth requested a review from a team as a code owner July 16, 2026 16:00
@SethHollandsworth
SethHollandsworth marked this pull request as draft July 16, 2026 16: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.

1 participant