Remove Unix specific hack in Encoding.GetEncoding
authorMatt Ellis <matell@microsoft.com>
Wed, 18 Feb 2015 03:53:41 +0000 (19:53 -0800)
committerMatt Ellis <matell@microsoft.com>
Wed, 18 Feb 2015 03:53:41 +0000 (19:53 -0800)
commitf07a40b1f97a94fa8faaa064b7def5203329d6df
tree4ba038c68d610159dcda4c9b5825dbe6ebce010f
parentae5945cf0406184d8d2623d07ceaa7caf6d3624d
Remove Unix specific hack in Encoding.GetEncoding

During Hello World bring-up for Unix, we ran into a crash which at the
time I thought was incorrectly due to some missing support in
globalization leading to a first chance exception being thrown.

Instead the problem was that due to a JIT bug, a hashtable that the
Encodings code tried to construct was getting bad data passed to the
constructor which caused an exception to try to be thrown.  The change
I provided caused the hashtable codepath to not be taken and hence
masked the issue.

Now that the JIT bug is fixed, we can remove this workaround. I
verified that HelloWorld still runs on Unix with these changes.
src/mscorlib/src/System/Text/Encoding.cs