dotnet/runtime
Auf GitHub ansehen`GenTreeAddrMode` has implicit truncation for its `gtOffset` field
Open
#86.609 geöffnet am 22. Mai 2023
area-CodeGen-coreclrhelp wanted
Repository-Metriken
- Stars
- (17.886 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 12T 11h) (661 gemergte PRs in 30 T)
Beschreibung
The constructor takes in and stores a ssize_t offset: https://github.com/dotnet/runtime/blob/main/src/coreclr/jit/gentree.h#L7089
However, it returns an int Offset() which may result in implicit truncation and loss of data: https://github.com/dotnet/runtime/pull/86400
We should likely change the signature to take in an int and ensure that all taken offsets are in range.