Discovered this while going through the code in dotnet/corefx#7291. It looks like IdnMapping is allocating a substring where it shouldn't need to, specifically here and here. I'm going to open up a PR in a couple of days for this when I have time, but I'm raising an issue here first as a self-reminder.