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

i#4774: Add preferred base to DR and drmodtrack interfaces #4775

Merged
merged 3 commits into from
Mar 10, 2021

Conversation

derekbruening
Copy link
Contributor

@derekbruening derekbruening commented Mar 10, 2021

Adds a preferred_base field to the module_data_t struct. There is no
compatibility break as DR allocates all such structs.

Adds a preferred_base field to the drmodtrack_info_t struct. There is
no compatibility break as it has a struct_size field. Offline
drmodtrack files do incur a version bump here, so an old reader will
fail when reading a file with the new field. The field is set to a -1
sentinel to aid in determining whether a file has the field or not.
This is also done here with the previously-added offset field.

Adds some sanity checks to the corresponding tests.

Fixes #4774

Adds a preferred_base field to the module_data_t struct.  There is no
compatibility break as DR allocates all such structs.

Adds a preferred_base field to the drmodtrack_info_t struct.  There is
no compatibility break as it has a struct_size field.  Offline
drmodtrack files do incur a version bump here, so an old reader will
fail when reading a file with the new field.  The field is set to a -1
sentinel to aid in determining whether a file has the field or not.
This is also done here with the previously-added offset field.

Adds some sanity checks to the corresponding tests.

Fixes #4474
@derekbruening
Copy link
Contributor Author

Windows failure looks like a pre-existing bug that happened to not fail the test: #4777

@derekbruening
Copy link
Contributor Author

PR #4778 is fixing the Windows issue and will be merged into here afterward.

PR #2940 and #2973 added an offset field to drmodtrack for #2939, but
they ifdef-ed the field in some places but not others, resulting in
uninitialized output.  Since it's already locked into the interface,
we always set it to 0 here and include it in internal structures to
fix the problem.

Tested on drmodtrack-test where the fields were manually confirmed to
no longer contain bogus values, and where the test doesn't fail when
i#4474 adds a new field that shifts the test buffer to avoid the
happens-to-match scenario that masked this bug in that test before.

Issue: #2939, #4474, #4777
Fixes #4777
@derekbruening derekbruening changed the title i#4474: Add preferred base to DR and drmodtrack interfaces i#4774: Add preferred base to DR and drmodtrack interfaces Mar 10, 2021
@derekbruening derekbruening merged commit c16bebf into master Mar 10, 2021
@derekbruening derekbruening deleted the i4474-preferred-base branch March 10, 2021 22: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.

Add preferred base to DR and drmodtrack module data
2 participants