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

Improved address object design #401

Closed
ghost opened this issue Apr 26, 2019 · 2 comments
Closed

Improved address object design #401

ghost opened this issue Apr 26, 2019 · 2 comments
Labels
2.1.0-CSD.1 Will be fixed in SARIF v2.1.0 CSD.1. bug impact-breaks-consumers impact-breaks-producers merged Changes merged into provisional draft. resolved-fixed

Comments

@ghost
Copy link

ghost commented Apr 26, 2019

When we decided to chain together address objects with a parentIndex property, we failed to understand that offset should be relative to parent rather than to base address.

  1. Specify that offset is w.r.t. parent.

  2. Rename offset to offsetFromParent to avoid natural baseAddress + offset error.

  3. Specify address resolution algorithm.

  4. CONSIDER other kinds such as "headers" (start of header list), "sections" (start of section list), "header", "tables", "table".

@ghost ghost added bug impact-breaks-consumers impact-breaks-producers 2.1.0-CSD.1 Will be fixed in SARIF v2.1.0 CSD.1. labels Apr 26, 2019
@ghost ghost self-assigned this Apr 26, 2019
@ghost ghost added the schema-todo label Apr 26, 2019
@ghost
Copy link
Author

ghost commented Apr 27, 2019

REVISED PROPOSAL

  • Rename baseAddress to effectiveAddress. It is the result of adding up all the parent offsets (assuming all the ancestors have offsets). Its presence allows some ancestors not to specify offsets.
  • Rename offset to offsetFromParent. Even though there is no longer a baseAddress property, it's still good to be explicit about this.
  • Specify address resolution algorithm.
  • Add two kind values:
    • "header": A data structure at the beginning of an addressable region that specifies the layout and location of objects in the remainder of the region.
    • "table": A contiguous region of addressable space with a distinct purpose and a specified internal organization

@ghost ghost changed the title address.baseAddress unnecessary: duplicates parentIndex Improved address object design Apr 28, 2019
@ghost ghost added merged Changes merged into provisional draft. resolved-fixed labels Apr 28, 2019
@ghost ghost closed this as completed Apr 28, 2019
@ghost ghost removed the schema-todo label Apr 29, 2019
@ghost
Copy link
Author

ghost commented Apr 29, 2019

Harlene is making these changes in the SDK and I will review. Removing the schema-todo label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.1.0-CSD.1 Will be fixed in SARIF v2.1.0 CSD.1. bug impact-breaks-consumers impact-breaks-producers merged Changes merged into provisional draft. resolved-fixed
Projects
None yet
Development

No branches or pull requests

0 participants