Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #18855 The code in #18855 used to crash the compiler with an out-of-bound access exception. It was because, previously, `ContextState.reset` clears the `comparers`, the cached pool of `TypeComparer`s, while keeping the variable `comparersInUse` intact. However, the `comparer` method of a context assumes `comparers` has a size greater than or equal to `comparersInUse`. So the invariant is clearly violated here and thus triggers the crash. This PR proposes a straightforward fix. Yet, the reason why only under both macros and cc this code path will be triggered remains to be investigated.
- Loading branch information