This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hongweipeng
Recipients crusaderky, hongweipeng, serhiy.storchaka, steven.daprano
Date 2019-09-12.03:50:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568260219.76.0.652546275298.issue38105@roundup.psfhosted.org>
In-reply-to
Content
More than -2, -1 -4 -8 -16 and -32 will cause many calls to __eq__.In `set_add_entry` use

```
perturb >>= PERTURB_SHIFT;
i = (i * 5 + 1 + perturb) & mask;
```
get the next index.In the example,mask is 7,perturb is -2. If i = 6, after execution, the value of i has not changed.We can do one more verification like:
```
do {
    perturb >>= PERTURB_SHIFT;
} while (i == ((i * 5 + 1 + perturb) & mask));
i = (i * 5 + 1 + perturb) & mask;
```
Of course this requires tests.
History
Date User Action Args
2019-09-12 03:50:19hongweipengsetrecipients: + hongweipeng, steven.daprano, serhiy.storchaka, crusaderky
2019-09-12 03:50:19hongweipengsetmessageid: <1568260219.76.0.652546275298.issue38105@roundup.psfhosted.org>
2019-09-12 03:50:19hongweipenglinkissue38105 messages
2019-09-12 03:50:19hongweipengcreate