[cdac] Read/store globals from contract descriptor#101450
Merged
elinor-fung merged 12 commits intodotnet:mainfrom Apr 26, 2024
Merged
[cdac] Read/store globals from contract descriptor#101450elinor-fung merged 12 commits intodotnet:mainfrom
elinor-fung merged 12 commits intodotnet:mainfrom
Conversation
Contributor
|
Tagging subscribers to this area: @tommcdon |
elinor-fung
commented
Apr 23, 2024
| value = pointerData[value].Value; | ||
| } | ||
|
|
||
| globals[name] = (value, global.Type); |
Member
Author
There was a problem hiding this comment.
This is just using the (optional) type string for now. I expect we'll do some mapping that isn't just string-based once we also read in the types.
This was referenced Apr 24, 2024
Closed
a6c9402 to
03ab101
Compare
elinor-fung
commented
Apr 24, 2024
elinor-fung
commented
Apr 24, 2024
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
This was referenced Apr 25, 2024
This was referenced Apr 25, 2024
Closed
Closed
AaronRobinsonMSFT
approved these changes
Apr 25, 2024
lambdageek
approved these changes
Apr 25, 2024
Member
lambdageek
left a comment
There was a problem hiding this comment.
Mostly LGTM
- I'm not sure we want to do global type validation on every read. But it doesn't seem like we have enough info to know if there's a better place to do it in contracts. ok for now.
- nit: I like validation methods in unit tests to include the name of the failing test (and possibly line info) of the actual test, not just the validation method, right in the message, not only in the stack trace
elinor-fung
commented
Apr 25, 2024
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
37 tasks
matouskozak
pushed a commit
to matouskozak/runtime
that referenced
this pull request
Apr 30, 2024
- Map indirect global values to corresponding values in `pointer_data` array from contract descriptor - Add `[Try]Read<T>`, `[Try]ReadPointer`, `[Try]ReadGlobal<T>` and `[Try]ReadGlobalPointer` to `Target` - Make cDAC implementation of `ISOSDacInterface9.GetBreakingChangeVersion` read value from globals - Create test helpers for mocking out reading from the target and providing a contract descriptor for different bitness/endianness - Add unit tests for reading global values (direct and indirect)
michaelgsharp
pushed a commit
to michaelgsharp/runtime
that referenced
this pull request
May 9, 2024
- Map indirect global values to corresponding values in `pointer_data` array from contract descriptor - Add `[Try]Read<T>`, `[Try]ReadPointer`, `[Try]ReadGlobal<T>` and `[Try]ReadGlobalPointer` to `Target` - Make cDAC implementation of `ISOSDacInterface9.GetBreakingChangeVersion` read value from globals - Create test helpers for mocking out reading from the target and providing a contract descriptor for different bitness/endianness - Add unit tests for reading global values (direct and indirect)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pointer_dataarray from contract descriptor[Try]Read<T>,[Try]ReadPointer,[Try]ReadGlobal<T>and[Try]ReadGlobalPointertoTargetISOSDacInterface9.GetBreakingChangeVersionread value from globalsContributes to #99298