diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6b9742392bb..f6bf5ec5b4f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -330,21 +330,21 @@ jobs: env: RUSTPYTHON_SKIP_ENV_POLLUTERS: true run: target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed --timeout 600 -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} - timeout-minutes: 45 + timeout-minutes: 60 - if: runner.os == 'macOS' name: run cpython platform-dependent tests (MacOS) env: RUSTPYTHON_SKIP_ENV_POLLUTERS: true run: target/release/rustpython -m test -j 1 --slowest --fail-env-changed --timeout 600 -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} - timeout-minutes: 45 + timeout-minutes: 50 - if: runner.os == 'Windows' name: run cpython platform-dependent tests (windows partial - fixme) env: RUSTPYTHON_SKIP_ENV_POLLUTERS: true run: target/release/rustpython -m test -j 1 --slowest --fail-env-changed --timeout 600 -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} ${{ env.WINDOWS_SKIPS }} - timeout-minutes: 45 + timeout-minutes: 50 - if: runner.os == 'Linux' name: run cpython tests to check if env polluters have stopped polluting (Common/Linux) diff --git a/crates/vm/src/dict_inner.rs b/crates/vm/src/dict_inner.rs index fe5f40b8f33..47fefe65af3 100644 --- a/crates/vm/src/dict_inner.rs +++ b/crates/vm/src/dict_inner.rs @@ -594,9 +594,13 @@ impl Dict { let ret = 'outer: loop { let (entry_key, ret) = { let inner = lock.take().unwrap_or_else(|| self.read()); - let idxs = idxs.get_or_insert_with(|| { - GenIndexes::new(hash_value, (inner.indices.len() - 1) as i64) - }); + let mask = (inner.indices.len() - 1) as i64; + let idxs = idxs.get_or_insert_with(|| GenIndexes::new(hash_value, mask)); + if idxs.mask != mask { + // Dict was resized since last probe, restart + *idxs = GenIndexes::new(hash_value, mask); + free_slot = None; + } loop { let index_index = idxs.next(); let index_entry = *unsafe {