Steve Dower added the comment:

This has been confirmed as a bug in VC14 (and earlier) and there'll be a fix 
going in soon.

For those interested, here's a brief rundown of the root cause:

* the switch in build_filter_spec() switches on a 64-bit value
* one case is 0x4000000000000001 and the rest are <=0x21
* PGO detects that 0x4000000000000001 is the hot case
(bug starts here)
* PGO detects that the cold cases are 32-bits or less and so enables an 
optimisation to skip comparing the high DWORD
* PGO adds check for the hot case, but using the 32-bit optimisation
 - it checks for "0x1" rather than the full value
(bug ends here)
* PGO adds checks for cold cases

The fix will be to check both hot and cold cases to see whether the 32-bit 
optimisation can be used. A "workaround" (that I wouldn't dream of using, but 
it illustrates the issue) would be to add a dead case that requires 64-bits. 
This would show up in the list of cold cases and prevent the 32-bit 
optimisation from being used.

No indication of when the fix will go in, but it should be in the next public 
release, and I'll certainly be able to test it in advance of that.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15993>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to