dotnet/runtime

`GenTreeAddrMode` has implicit truncation for its `gtOffset` field

Open

#86,609 建立於 2023年5月22日

在 GitHub 查看
 (1 留言) (1 反應) (0 負責人)C# (5,445 fork)batch import
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.

貢獻者指南