dotnet/runtime
在 GitHub 查看`GenTreeAddrMode` has implicit truncation for its `gtOffset` field
Open
#86,609 建立於 2023年5月22日
area-CodeGen-coreclrhelp wanted
倉庫指標
- Star
- (17,886 star)
- PR 合併指標
- (平均合併 12天 11小時) (30 天內合併 661 個 PR)
描述
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.