dotnet/runtime

Add code to verify that operations on short/long bitsets operate on the correct epoch.

オープン

#7,957 opened on 2017/04/26

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)C# (5,445 件のフォーク)batch import
area-CodeGen-coreclrhelp wanted

Repository metrics

Stars
 (17,886 個のスター)
PR merge metrics
 (平均マージ 12d 11h) (30d で 661 merged PRs)

説明

See the discussion in https://github.com/dotnet/coreclr/pull/11233 for more details.

These bitsets currently have no checks to ensure that the epoch in which a bitset was created matches the epoch in which it is being used. Depending on the actual representation and the operation, mismatching epochs can have a variety of harmful effects as they can cause out-of-bounds reads or writes.

@BruceForstall writes

Ideally, we would implement a DEBUG ShortLong representation bitset that also carried epoch along with every bitset, and asserted that operations between two bitsets were in the same epoch.

Which seems like a good suggestion.

category:testing theme:jit-coding-style skill-level:intermediate cost:small impact:small

コントリビューターガイド