Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Merge nmirror to master - #1318

Merged
jkotas merged 5 commits into
masterfrom
nmirror
May 24, 2016
Merged

jkotas merged 5 commits into
masterfrom
nmirror

Conversation

@jkotas

@jkotas jkotas commented May 24, 2016

Copy link
Copy Markdown
Member

No description provided.

jkotas and others added 5 commits May 18, 2016 09:28
CR: morganb, yzha, trylek

The primality tests in DictionaryBase and FixedHashTable classes were flawed.  First, IsPrime(x) incorrectly returned true for squares of prime numbers (false positives).  Second, for very big arguments the multiplication might overflow, which caused the loop to run many times longer than required.  Third, for x == int.MaxValue the function incorrectly returned false (false negative).

Instead of fixing the loop condition, I simply copied the table of pre-calculated prime numbers from the CoreFX version of the HashHelpers class as Vance and Tomas suggested during the code review.

Also put back the linker switch that I incorrectly removed in changeset 1603970 (not related to the fix above).

[tfs-changeset: 1606004]
…rshal GetMarshalClass calkl for CoreCLR

[tfs-changeset: 1607476]
@jkotas
jkotas merged commit 694f91e into master May 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants